我想查看我所有的本地分支,但没有像 origin/master
这样的远程跟踪引用
这个命令向我显示了一个漂亮的图表,上面装饰了我所有的本地和远程跟踪分支:
git log --oneline --graph --decorate --all
我应该在此命令中添加/删除什么标志以仅显示本地分支?
最佳答案
这将显示所有本地分支机构。
git log --graph --oneline --branches
来自 git log --help
--branches[=<pattern>] Pretend as if all the refs in refs/heads are listed on the command line as <commit>. If <pattern> is given, limit branches to ones matching given shell glob. If pattern lacks ?, *, or [, /* at the end is implied.
所以 --branches
就足够了。我喜欢添加 --decorate
并给整个命令一个简短的别名。
关于git - 如何仅在我的本地分支机构上使用 "git log --graph --oneline --all"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12177576/