有没有任何git命令来显示关于本地分支的信息? [英] Is there any git command to display the information about local branch?

查看:156
本文介绍了有没有任何git命令来显示关于本地分支的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我是分支 A ,并用命令创建新分支 B

git checkout -b B



有没有办法后来我可以找出分支B从哪里复制? (A)在这种情况下

解决方案

您可以执行 git merge-base branchX branchY 会给你共同的父母。这会告诉你什么时候它将分支从分支中分离出来,但是没有办法告诉谁分开了它。


For example, if I am branch A, and created new branch B with the command

git checkout -b B

is there any way that sometimes later I can find out where branch B copied from?? (A) in this case

解决方案

You could do git merge-base branchX branchY that will give you the common parent. That will tell you when it split off the branch, but there is no way to tell who it split off of.

这篇关于有没有任何git命令来显示关于本地分支的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆