如何找到分支机构的本地/原始提交?

发布于 2025-02-09 10:24:27 字数 448 浏览 1 评论 0原文

有两个分支Mastera。我知道很久以前的分支已经完成了一些工作。谁在该分支上工作,将Master分支合并到分支a中,然后将分支a合并到Master 。所有分支都在遥控器中。现在,我如何找到最初来自分支a的提交?

nb 我不是在寻找某些提交的分支名称。相反,我有分支名称,我正在寻找提交,所以请不要以 this 或其他类似的问题

There are two branches master and A. I know that some work has been done in the branch A a long time ago. Whoever was working on that branch, merged the master branch into the branch A, then merged the branch A to the master. All the branched are in remote. Now how i can find the commits that originally come from branch A?

N.B I am not looking for the branch name of certain commit. Rather I have the branch name and I am looking for the commits, so please don't mark it duplicate with this or other similar question

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

关于从前 2025-02-16 10:24:27

”中所述

(branch_A_tag)
     |
--X--A--B--C--D--F  (master) 
      \   / \   /
       \ /   \ /
        G--H--I--J  (branch A)
vonc@vclp MINGW64 ~/git/tests/branchOrigin (branch_A)
git rev-list --exclude-first-parent-only ^master branch_A

如“ J -I -H -G ,这是最初来自分支A的承诺。

As described in "Finding a branch point with Git?", that should be possible with Git 2.36 (Q2 2022):

(branch_A_tag)
     |
--X--A--B--C--D--F  (master) 
      \   / \   /
       \ /   \ /
        G--H--I--J  (branch A)
vonc@vclp MINGW64 ~/git/tests/branchOrigin (branch_A)
git rev-list --exclude-first-parent-only ^master branch_A

That will give you J -- I -- H -- G, which are the commits that originally come from branch A.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文