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

"Not possible to fast-forward" when pull.ff=only and new commits on remote

From
KAKenneth Arnold <ka37@calvin.edu>
Date
Oct 19, 2021, 17:23 UTC
Message-ID
<CH2PR06MB650424B4205102AC6A48F489B1BD9@CH2PR06MB6504.namprd06.prod.outlook.com>
After upgrade to 2.33.1, the behavior of `pull.ff=only` has changed in a way that breaks some workflows, notably the default used in VSCode.
Example (specific repo doesn't matter)
```
$ git clone git@github.com:kcarnold/util.git
...
$ cd util
$ echo "" > test
$ git add test
$ git commit -m "Test"
$ git -c pull.ff=only pull
fatal: Not possible to fast-forward, aborting.
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
```
Previously this pull succeeded without error, which was as expected because no merge was necessary. 
VS Code users have reported this problem because that editor has a "sync" option that seems to run something like `git pull && git push`.
Next: Jeff King
Message 1 of 9 in “"Not possible to fast-forward" when pull.ff=only and new commits on remote”
  1. Kenneth ArnoldOct 19, 2021
  2. Jeff KingOct 19, 2021
  3. Junio C HamanoOct 20, 2021
  4. Jeff KingOct 20, 2021
  5. Junio C HamanoOct 20, 2021
  6. Jeff KingOct 20, 2021
  7. pull: --ff-only should make it a noop when already-up-to-dateJunio C Hamano, Oct 20, 2021
  8. Jeff KingOct 20, 2021
  9. Alex HenrieOct 21, 2021

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.