对于git中的一个子分支,我忘记了我的父分支,在我的本地机器中有很多分支,我需要知道父-子分支的树结构。
发布于 2022-08-05 19:22:38
To see the parent directly above your branch run
git show-branch \
| sed "s/].*//" \
| grep "\*" \
| grep -v "$(git rev-parse --abbrev-ref HEAD)" \
| head -n1 \
| sed "s/^.*\[//"git show-branch也可以看到这个结构。每一个缩进都是上面的一根树枝。

https://stackoverflow.com/questions/73254054
复制相似问题