Subject: Re: Git pull --rebase and --reset-author-date

From: Junio C Hamano <[email-masked]>
Date: Fri, 13 Dec 2024 12:31:14 +0900

Ricardo Almeida <[email-masked]> writes:

> Hi Junio,
>
>> Can't you just use "git fetch && git rebase --..." instead of "pull"
>> short-hand?
>
> But then it wouldn't update the master branch... When I'm on myBranch
> and execute "git pull origin --rebase --stat master:master" it does
> bring the master branch up to date, so...

"git pull origin master:master" is a bit unusal thing to say these
days, but the "take their refs/heads/master, and copy it to my
refs/heads/master (as long as it results in a fast-forward update
and as long as I am not on 'master')" part of it can be reproduced
by "git fetch origin master:master".  So I do not see what you see
as a problem.  You are willing to be explicit to say that unusual
"directly update my local branch 'master'" from the command line for
your "git pull", so I would imagine you are also OK with doing the
same with "git fetch" in the replacement.