git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ricardo Almeida <ric.almeida@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git pull --rebase and --reset-author-date
Date: Fri, 13 Dec 2024 12:31:14 +0900	[thread overview]
Message-ID: <xmqq4j38fed9.fsf@gitster.g> (raw)
In-Reply-To: <CAMKQPDaB2fP-4n9_bw1fjB7JntZ1DWMSpO01h5uuMJ-LzzufdQ@mail.gmail.com> (Ricardo Almeida's message of "Thu, 12 Dec 2024 08:25:06 +0000")

Ricardo Almeida <ric.almeida@gmail.com> 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.

      reply	other threads:[~2024-12-13  3:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 20:55 Git pull --rebase and --reset-author-date Ricardo Almeida
2024-12-12  3:16 ` Junio C Hamano
2024-12-12  8:25   ` Ricardo Almeida
2024-12-13  3:31     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4j38fed9.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ric.almeida@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).