From: Sergey Organov Date: Wed, 19 Apr 2023 17:03:58 GMT Subject: Re: Git rebase no longer defaults to upstream after force push Message-ID: <87ttxbztvl.fsf@osv.gnss.ru> In-Reply-To: Erik Cervin Edin writes: > On Tue, Apr 18, 2023 at 5:54 PM Cem Gündoğdu wrote: >> > If 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 and >> > when calculating which commits have been introduced by >> > . >> >> 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.. 🤔 $ git help merge-base has a thorough discussion of --fork-point that might be helpful. As far as I understand, it helps to DWYM when remote branch has been rewound, and causes nasty confusion when it fires unintentionally. -- Sergey