git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git pull --ff-only errors when git merge --ff-only passes

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2024, 15:31 UTC
Message-ID
<xmqqo78i6o21.fsf@gitster.g>
In-Reply-To
<CAKRNJbAnUBmR5MHY=uSF1A3docO-uxWG4agWuFZEyPUnduyWHw@mail.gmail.com>
Arundas T C <arundas.tc@gmail.com> writes:
Show 9 quoted lines
> 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?

Previous: Arundas T CNext: brian m. carlson
Message 2 of 3 in “git pull --ff-only errors when git merge --ff-only passes”
  1. Arundas T CJun 3, 2024
  2. Junio C HamanoJun 3, 2024
  3. brian m. carlsonJun 3, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.