获取在git中创建(当前)分支的分支的名称

时间:2022-03-24 11:13:21

Lets say I created a branch called feature1 from develop branch.

让我们说我从develop分支创建了一个名为feature1的分支。

Also, I created a issue123 branch from feature1 branch.

另外,我从feature1分支创建了一个issue123分支。

Now I want to know that feature1 is created from develop branch, and similarly issue123 branch is created from develop branch.

现在我想知道feature1是从develop分支创建的,类似的issue123分支是从develop分支创建的。

How can I do that?

我怎样才能做到这一点?

Any help is very much appreciated. Thanks.

很感谢任何形式的帮助。谢谢。

2 个解决方案

#1


0  

There is a similar question already and here's a link to an answer.

还有一个类似的问题,这里是答案的链接。

This will print a branch tree.

这将打印一个分支树。

Output of git branch in tree like fashion

像时尚一样在树中输出git branch

#2


0  

Not Exactly what you want, but some close solutions to it are ..

不完全是你想要的,但一些接近的解决方案是......

git show-branch
git show-branch --all

And,

和,

git log --all --graph --decorate --oneline --simplify-by-decoration

#1


0  

There is a similar question already and here's a link to an answer.

还有一个类似的问题,这里是答案的链接。

This will print a branch tree.

这将打印一个分支树。

Output of git branch in tree like fashion

像时尚一样在树中输出git branch

#2


0  

Not Exactly what you want, but some close solutions to it are ..

不完全是你想要的,但一些接近的解决方案是......

git show-branch
git show-branch --all

And,

和,

git log --all --graph --decorate --oneline --simplify-by-decoration