git 分支图

下边的命令可以打印出git的分支图

git log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative


或者通过下列命令在git config文件里面设置别名。

git config --global alias.lg "log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"

然后通过命令

git lg

来列出分支图

你可能感兴趣的:(git,Graph,branch)