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.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步