是否有命令可以查看从特定分支创建或与特定分支合并的所有分支?
是否有命令可以查看从特定分支创建或与特定分支合并的所有分支?基本上,我们有分支 AA,它用于创建其他一些分支,并且分支 AA 之后进行了更新。我想确保所有使用分支 AA 的分支都已更新。
Is there a command to see all the branches created from or merged with a specific branch? Basically, we have branch AA which was used to create some other branches and branch AA was updated after. I would like to make sure all the branches that used branch AA are updated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,Git 不会跟踪分支来自何处或哪个提交与哪个分支相关联。您可以查看日志并猜测它来自哪个分支,但无法保证它来自该分支。
如果您希望确保所有分支都进行了提交,则可以交叉引用 gitbranch --contains shaOfCommit 与 gitbranch 的结果
No, Git doesn't keep track of where a branch came from or what commit was tied to what branch. You can look at the log and make a guess what branch that it came from, but there is no way to guarantee that it came from that branch.
If you made a commit that you want to make sure all your branches have, you can cross reference the results of
git branch --contains shaOfCommit
withgit branch