我该如何获取当前HEAD的一级子分支列表?
我可以使用以下命令获取整个树形结构:
git log --graph --abbrev-commit --pretty=decorate --branches
这提供了
* 2eff4a7... (refs/heads/issue-8351) Added a factory factory factory.
* 2e387aa... Refactored all of the factory factories.
| * b3fad52... (refs/heads/issue-8354) Moved the baz out of the constructor.
|/
| * f4cf3fe... (refs/heads/experimental) quuz looking good
| * 1d276b9... Risky fix to replace the quux with the quuz.
| * d6b0222... (refs/heads/issue-7559) Fixed the quux in the foo.
|/
| * 3f4cfff... (refs/heads/dev) wip
|/
* 76f493f... (refs/heads/master) SVN 30192
但是我只想获取当前分支的一级子节点的简单列表,就像这个 master
的例子:
dev
issue-7559
issue-8354
issue-8351
如果我在分支issue-7559
上,我只能看到:
experimental
我该如何处理这个问题呢?
git-for-each
循环来测试任何其他分支和正在测试的分支的合并基是否与当前分支不同。虽然这听起来相当随意,但你是不是想解决一个更大的问题呢? - CB Baileygit log
压缩提交。 - mskfisher