比如我从 branch A 切出一个 branch B
然后对 branch B 做了一系列的 *** 作
然后忘记了 branch B 是从哪个分支切出来的
请问能不能找到基于哪个分支创建的?
git reflog show <childBranch>
32c3956 (HEAD -> currentBranch, origin/fatherBranch, fatherBranch, list) childBranch@{0}: branch: Created from fatherBranch
childBranch 是你新建的分支。
fatherBranch 是它的父分支,也就是来源分支。
或者git fetch --help Using refspecs explicitly: $ git fetch origin +pu:pu maint:tmp This updates (or creates, as necessary) branches pu and tmp in the local repository by fetching from the branches (respectively) pu and maint f
以上就是关于怎么查看当前的git分支是基于哪个分支创建的全部的内容,包括:怎么查看当前的git分支是基于哪个分支创建的、怎么拉取git服务器上面的分支到本机、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)