Coder Social home page Coder Social logo

gittest's Introduction

gitTest,纯粹是为了学习Git的操作和使用

学习git的使用

  • git init 初始化一个仓库
  • git clone 克隆远程仓库到本地
  • git add 当修改了文件之后,将修改的文件进行跟踪
  • git commit 将修改的文件添加到本地版本库
  • git checkout 切换分支
  • git pull 从远程仓库拉取对应的版本,更新到本地 用法git pull <远程主机名> <远程分支名>:<本地分支名> 例如git pull origin master:addTitle 就表示从远程的master分支拉取到本地的addTitle分支
  • git push 将本地版本更新到远程连接分支
  • git status 查看当前的状态
  • git branch 查看分支
  • git merge 合并分支
  • git push 将本地的分支内容推到远程分支 用法git push <远程主机名> <本地分支名>:<远程分支名> 例如git push origin addTitle:addTitle 就是将本地的addTitle分支push到远程主机origin的addTitle分支上了
  • last modified by master
  • git reset --hard 3dadf8ka32 强行恢复到某个版本

Notice:

  • git pull 拉取的只是在origin上的本地分支,而不是master分支!!!这点一定要注意,以后应该这样用git pull origin/master 而不是简单的git pull...当然了,也跟绑定了远端分支有关

gittest's People

Contributors

callingwisdom2015 avatar horizonchm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.