查看分支:git branch
创建分支:git branch <name>
切换分支:git checkout <name>
创建+切换分支:git checkout -b <name>
合并某分支到当前分支:git merge <name>
删除分支:git branch -d <name>
用带参数的
git log
也可以看到分支的合并情况:
git log --graph --pretty=oneline --abbrev-commit 使用no-ff的方式
git merge
合并分支git merge --no-ff -m "merge with no-ff" dev
当手头工作没有完成时,先把工作现场git stash
一下,然后去修复bug,修复后,再git stash pop
,回到工作现场。
使用git stash list
查看保存个工作现场
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c291467cc7c747b1810aab2fb8863508000