From: Felipe Contreras Date: Mon, 19 Jul 2021 18:17:09 GMT Subject: RE: why "git rebase" searching the duplicate patches in rather than in ? Message-ID: <60f5c1a5c8422_13f62b208e@natae.notmuch> In-Reply-To: Andy Zhang wrote: > 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 branch>? > > 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 . My understanding is that only applies when --onto is not specified: git rebase master topic In this case "master" is both the new base, and upstream, and it's in this case where duplicates are skipped. If you specify --onto master, then this isn't done. -- Felipe Contreras