查看分支最初是从哪个分支创建的? [英] See which branch a branch was originally created from?

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

问题描述

我有一个从现有分支创建的分支。但是我不记得现在使用哪个分支。我怎样才能找出这是哪个分支?

解决方案

分行没有父母。



分支名称是当前特定提交的严格回购本地临时标签。



您可以通过本地跟踪实现本地效果:

  git分支-t测试大师

会将分支测试设置为跟踪分支 master ,因此检出的 git pull 会默认合并, git rebase 将会使用默认情况下,等等 - 并且 git branch -avv 会显示任何配置的跟踪。



任何对应分行名称和配置在您的回购和其他任何回购协议中仅仅是约定和协作。


I have a branch that was created from an existing branch. However I don't remember which existing branch was used. How can I find out which branch this was?

解决方案

Branches do not have parents.

Commits have parents.

A branch name is a strictly repo-local temporary label for a currently-particular commit.

You can achieve the effect you want locally with local tracking:

git branch -t testing master

will set branch testing up to track branch master, so a git pull with that checked out will merge from that by default, git rebase will use that by default, and so forth -- and git branch -avv will show any configured tracking.

Any correspondence between branch names and configuration in your repo and any other repo is just convention and collaboration in action.

这篇关于查看分支最初是从哪个分支创建的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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