Processing math: 100%

Git学习笔记-Git Branching

1.Branch is just a pointer called HEAD which points to the current snapshot.

2.Create a new branch:git branch [branch-name].

3.Switching to an existing branch:git checkout [new branch].

4.Merge branch: merge a branch to the mater branch, just gitcheckoutmaster;git merge [another branch]. After merge it, you can delete it by $git branch -d [another branch].

5.To see all branch :gitbranch;Toseebranchmerged:git branch --merged; To see branch not merged:$git branch --no-merged;

6.tracking branches are local branches that have a direct relationship to a remote branch. So it will automatically update when you push or pull.

7.You can set up track branch tracking remote branch other than master by: get checkout --track origin/[serverfix].

8.Delete Remote Branches : git push origin   :[serverfix].

9.Delete local branch: git branch -d hotfix.

posted @   zdai  阅读(154)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示