How can I tell which remote “parent” branch my branch is based on?

后端 未结 4 1865
温柔的废话
温柔的废话 2021-01-30 10:47

I have a scenario in which there a several remote tracking branches within my local repository that I must sync up to. Our workflow model is:

  • make a branch locally
4条回答
  •  耶瑟儿~
    2021-01-30 11:11

    Git does not track what branches a commit was put through. There is no way to tell. If the commits happened on your repo, then you can inspect the reflog, but that's about it. Take a look at the explanation of the DAG in the Pro Git book - also read up on reflog in there.

    You can also visualize history better with gitk --all or git log --graph --decorate

    Hope this helps.

提交回复
热议问题