public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Arundas T C <arundas.tc@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: git pull --ff-only errors when git merge --ff-only passes
Date: Mon, 03 Jun 2024 08:31:02 -0700	[thread overview]
Message-ID: <xmqqo78i6o21.fsf@gitster.g> (raw)
In-Reply-To: <CAKRNJbAnUBmR5MHY=uSF1A3docO-uxWG4agWuFZEyPUnduyWHw@mail.gmail.com> (Arundas T. C.'s message of "Mon, 3 Jun 2024 14:28:41 +0800")

Arundas T C <arundas.tc@gmail•com> writes:

> What happened instead? (Actual behavior)
>
> error: cannot pull with rebase: You have unstaged changes.
> error: Please commit or stash them.
>
> What's different between what you expected and what actually happened?
>
> It errored out because of unstaged changes, even though doing `git
> merge --ff-only` will correctly do what's expected. See below.

But you are not doing "merge" but "rebase", according to the error
message.  "pull" was told to do "rebase" instead of "merge" and it
stopped because it did not want to clobber the local changes.  So
it appears that what "merge --ff-only" would have do has very little
to do with what "pull --ff-only" you configured would do, no?


  reply	other threads:[~2024-06-03 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03  6:28 git pull --ff-only errors when git merge --ff-only passes Arundas T C
2024-06-03 15:31 ` Junio C Hamano [this message]
2024-06-03 21:30 ` brian m. carlson

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=xmqqo78i6o21.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=arundas.tc@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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