Re: Pick the right default and stop warn on `git pull`
- From
Alex Henrie <alexhenrie24@gmail.com>
- Date
- Nov 24, 2020, 20:21 UTC
- Message-ID
- <CAMMLpeSoGtqeCm6u-zrHqvPhW7brvNk_kwde3uqmbPcP1JgMHg@mail.gmail.com>
- In-Reply-To
- <CAMP44s08mEyYqbjOeTeS46CngrbQMqP2=cMr1dtRLLk_BLAq3w@mail.gmail.com>
On Mon, Nov 23, 2020 at 8:41 PM Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 6 quoted lines
> > 1. git pull # fail by default unless it's a fast-forward > 2. git pull --merge # force a merge (unless it's a fast-forward, > depending on pull.ff) > 3. git pull --rebase # force a rebase (unless it's a fast-forward, > depending on pull.ff)
I'm not sure that we need a new --merge flag for this. It sounds like we just want pull.ff to default to "only" if pull.rebase is not set, and if pull.rebase is set (or --rebase or --no-rebase is passed on the command line) then pull.ff should default to "true". If I understand correctly, that would get us everything we want without adding any new variables or making any major changes to how Git works.
-Alex