Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如标题所暗示的,我怎么知道远程分支是否是本地分支的祖先,反之亦然?
浏览本地分支的祖先,看看是否遇到远程分支提示。
您可以使用 graph walker 浏览本地分支祖先(请参阅 参考资料Repo.get_walker())。
Repo.get_walker()