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

Why can't git pull --rebase work if there are modified files?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Dec 30, 2008, 21:40 UTC
Message-ID
<2729632a0812301340y735c3946weee55c9856d4e6a9@mail.gmail.com>

If I have locally modified files and I try to 'git pull --rebase', it fails because of the locally modified files. If I don't use the --rebase option, it works (but generates a merge commit if I have local commits). Why does rebasing require an unmodified checkout? It seems like it should only stop if I something in the newly fetched changes conflict with my local changes.

I almost always have modified files in my checkout for things I'm working on. I also often have a commit or two that haven't been pushed because I'm waiting until I get to a good point before pushing. If I do 'git pull', I end up with a merge commit each time. That's why I want to use --rebase, but for it to work, I have to git stash, then rebase then git stash pop.

Next: Thomas Rast
Message 1 of 2 in “Why can't git pull --rebase work if there are modified files?”
  1. skillzero@gmail.comDec 30, 2008
  2. Thomas RastDec 30, 2008

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.