Git:“git log --graph”和“git log --graph --all”有什么区别?

Jes*_*rce 4 git git-log

命令: git log --graph, 在输出的左侧显示带有基于文本的图形表示的提交日志。

关于--all限制提交输出的选项,git 文档说:

提交限制

除了使用描述中解释的特殊符号指定应该列出的提交范围之外,还可以应用额外的提交限制。

- 全部

假设所有 refs 在refs/命令行中都列为<commit>.

我不太了解使用此选项获得的输出。

所有的 refs 是 refs/什么?

与提交限制相关的默认值是git log --graph 多少?

关于提交限制, 之间有什么区别?git log --graphgit log --graph --all

Gab*_*lla 5

--all将包括来自所有分支的提交,包括refs/tagsrefs/remotes

如果您只想要所有分支,则可以使用--branches.

git log --graph --all

* 456 (master)
|
* 123           * 789 (feature-1)
|  _____________|
| /
|/
Run Code Online (Sandbox Code Playgroud)

git log --graph

* 456 (master)
|
* 123           
Run Code Online (Sandbox Code Playgroud)

关于提交限制,这两个命令之间没有区别:如果不指定限制,将显示所有提交。