Re: Git rebase no longer defaults to upstream after force push
- From
- Erik Cervin Edin <erik@cervined.in>
- Date
- Apr 19, 2023, 15:43 UTC
- Message-ID
- <CA+JQ7M_XP6fjdut10ry9db9M3pEhp3-+zToJ93gnbHo-4p_8uQ@mail.gmail.com>
- In-Reply-To
- <CAGrwipO7odTbuKgwDmU+3hY0pEeTdjxx-_9=oufUdBzyQ_eRvQ@mail.gmail.com>
On Tue, Apr 18, 2023 at 5:54 PM Cem Gündoğdu <cscallsign@gmail.com> wrote:
Show 10 quoted lines
> > If <upstream> is not specified, [...] and the --fork-point option is assumed. > > The --fork-point option does this: > > > Use reflog to find a better common ancestor between <upstream> and <branch> when calculating which commits have been introduced by <branch>. > > Since the parent of a is still in the reflog of origin/a, it is not > being rebased (the rationale being that the commit *was* in origin/a > at some point). If you want to disable this behavior, add > --no-fork-point option:
Yes. That's it, thank you for pointing out --fork-point. That's indeed what's causing the unexpected behavior.
Do you happen to know when such behavior is desirable? I'm tempted to change the default to --no-fork-point but usually when something is default there's a valid reason.. 🤔