1、克隆远程指定分支的代码仓库到本地指定目录
git clone -b lfFranceTelecomDemo gitlab@10.62.124.41:T5/grasper.git grasper-lfFranceTelecomDemo
其中,-b参数用于指定 分支,grasper-lfFranceTelecomDemo是指定的本地存放代码仓库的目录
2、查看分支合并情况(即分支合并图)
git log --graph --pretty=oneline --abbrev-commit
或者
git log --graph
3、stashing your work
#stashing your work
git stash
#当有多个stash时,最好给每个stash加一个注释
git stash save "message"
#Re-applying your stashed changes
git stash pop
#需要将暂存的changes应用到多个分支时
git stash apply
#stash pop其实质就是出栈,默认是后进先出(最先re-apply stash@{0}),也可以指定re-apply哪个stash
git stash pop stash@{2}
#查看stash个数
git stash list
#Viewing stash diffs
git stash show
或
git stash show -p
#删除指定的stash
git stash drop stash@{1}
#删除所有的stash
git stash clear
参考:http://blog.csdn.net/u011403718/article/details/54345710
Git官网:https://git-scm.com/
Git源码:https://github.com/git/git
Git文档:https://git-scm.com/book/en/v2
Git入门:https://github.com/geeeeeeeeek/git-recipes/wiki
图解Git命令:https://github.com/geeeeeeeeek/git-recipes/wiki/4.1-%E5%9B%BE%E8%A7%A3-Git-%E5%91%BD%E4%BB%A4