From: Andy Zhang Date: Mon, 19 Jul 2021 17:45:01 GMT Subject: why "git rebase" searching the duplicate patches in rather than in ? Message-ID: In-Reply-To: why "git rebase" searching the duplicate patches in rather than in ? hi, all: I am reading the help of "git rebase", it says: "If the upstream branch already contains a change you have made (e.g., because you mailed a patch which was applied upstream), then that commit will be skipped. " But, because we are applying commits to rather than to , I really don't understand why we are searching the duplicate patches in rather than in ? In the following example, the git command is as: git rebase --onto master next topic I think it should be reasonable to search the duplicate patches in (i.e, master) instead of . If possible, an improvement may be an option for enabling searching in as well? Thank you in advance for any enlightenment you can provide! Jintao Zhu //---- example: Old tree is: o---o---o---o---o master \ o---o---o---o---o next \ o---o---o topic We want our tree to look like this: o---o---o---o---o master | \ | o'--o'--o' topic \ o---o---o---o---o next We can get this using the following command: git rebase --onto master next topic //----