Git] [re-learn basic commands papers

1.git commit: an increase in submission to submit a tree node, note: the branch is pointing submitted nodes.

  

 

2.git branch newImage: represents the creation of a branch called newImage.

 

3.git checkout newImage: a handoff to newimage branch. * An asterisk indicates a branch currently located.

 

4.git checkout -b bugFix: This is a short command, represents a new and BugFix branch switch to branch BugFix.

5.git merge bugFix: bugFix said it would merge the branch to the current branch, this time will create a new child node, it has two parent nodes. This is called: a new branch, merged back into the main line on which to develop a new feature, after the completion of the development.

 

 6. Merge addition, there is a method of merging branches Git, that is git rebase. Causes the two branches of the functions appear to git rebase later use in order to develop, but in fact they are developed in parallel. So the difference between it and git merge is submit two forked tree was still a difference between a straight line.

  git rebase master: the current branch will move directly to the master branch and create a copy of the node.

(In fact, this method is not rebase each other trouble, the key is whether you want to keep the sub-branch)

 

Guess you like

Origin www.cnblogs.com/zhangnan35/p/11229689.html