git 如何在git中找到分支的起源?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25814946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 10:22:21  来源:igfitidea点击:

How to find origin of a branch in git?

gitbranch

提问by dlucci

Say if my project contains two masters (master and master_ios) and I want to see what the origin of a feature branch is (by origin, i mean the branch the feature branch is based off), how would I accomplish this in git?

假设我的项目包含两个主节点(master 和 master_ios),并且我想查看功能分支的起源是什么(按起源,我的意思是功能分支所基于的分支),我将如何在 git 中完成此操作?

回答by Preethi

git remote show origin

shows remote and local branches with tracking info.

显示带有跟踪信息的远程和本地分支。