Re: Git pull --rebase and --reset-author-date
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 13, 2024, 03:31 UTC
- Message-ID
- <xmqq4j38fed9.fsf@gitster.g>
- In-Reply-To
- <CAMKQPDaB2fP-4n9_bw1fjB7JntZ1DWMSpO01h5uuMJ-LzzufdQ@mail.gmail.com>
Ricardo Almeida <ric.almeida@gmail.com> writes:
Show 8 quoted lines
> 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.