GIT - 我从哪里分支? [英] GIT - Where did I branch from?

查看:72
本文介绍了GIT - 我从哪里分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我回到了一个旧项目,并且运行了很好的 git status 来弄清楚发生了什么,我注意到了太多分支!我想在做这件事之前做一些家务管理,但我不确定哪个分支来自哪个分店..

I got back on an old project and I ran the nice git status to figure out what was going on and I noticed way too many branches! I want to do some housekeeping before starting to work on this again but I'm not sure which branch comes from which..

E.G。 branchA是否来自开发? branchB派生自master还是branchA?

E.G. Does "branchA" derive from "develop"? Does "branchB" derive from "master" or "branchA"??

如何回答上面的示例问题?

How can I answer the sample questions above?

推荐答案

对此,没有规范的答案,因为分支只是指向DAG中某些提交的指针。例如, master foo 可能指向相同的提交;如果你从 foo 创建一个分支,它就像从 master 创建分支一样。

There's no canonical answer for this, since branches are simply pointers to certain commits in a DAG. For instance, master and foo could be pointing at the same commit; if you then create a branch from foo, it's effectively the same as creating a branch from master.

也就是说,如果你可视化提交图(通过 gitk 或其他一些图形历史工具),你可以获得一般意义分支点在提交图中的位置,以及各种分支指针指向的位置。

That said, if you visualize the commit graph (via gitk or some other graphical history tool), you can get a general sense of where the branch points are in the commit graph, versus where various branch pointers are pointing.

这篇关于GIT - 我从哪里分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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