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

Dropbox and "Your local changes to the following files would be overwritten by merge"

From
Yuri Kanivetsky <yuri.kanivetsky@gmail.com>
Date
Jul 23, 2022, 12:40 UTC
Message-ID
<CAMhVC3acU06uBDAjd5LEiCvuf8=XW_1RYVVt7CdKr-JqB7cRFA@mail.gmail.com>
Hi,

I've started to run into issues with git relatively recently. Let's take the issue I'm experiencing at the moment. I'm trying to rewrite a history (git rebase -i some-hash, move 4 commits up, rename the last 2 of them), and it fails to apply the next commit on the todo list after these 4 (I've redacted the message):

[detached HEAD 1888888] name-3
 Date: Mon May 9 22:41:03 2022 +0300
 1 file changed, 1 insertion(+)
[detached HEAD 00b5555] name-4
 Date: Sat Jul 23 13:19:42 2022 +0300
 1 file changed, 1 insertion(+)
error: Your local changes to the following files would be overwritten by merge:
        some paths
Please commit your changes or stash them before you merge.
Aborting
hint: Could not execute the todo command
hint:
hint:     pick 8222222222222222222222222222222222222222 name-5
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint:     git rebase --edit-todo
hint:     git rebase --continue
Could not apply 8222222... name-5

The files it complains about, they're versioned, and they're not changed when it stops. If I copy the repository (cp -r), and repeat the steps, it sometimes succeeds, sometimes not. If I were to split it into smaller steps I believe it would succeed. In other words I got this message occasionally for no apparent reason. Usually it succeeds if I simply repeat the steps. Sometimes I need to do it in smaller steps.

First I thought it's an issue with vim-fugitive, but I can reproduce it with git alone. The other culprits I can think of are magit (I believe I used it with this repository), vim, and now that I think about it... Dropbox? The repository is in a dropbox directory. I understand that this is uncommon, but a couple of my repositories are in a dropbox directory and I'd like to put the reasons aside. Can you suggest what I can do to find the reason it fails? Do you know what exactly triggers this message (the content changed, modification time, ctime)?

I'm running Alpine Linux and git-2.36.1.

Regards, Yuri

Next: rsbecker@nexbridge.com
Message 1 of 6 in “Dropbox and "Your local changes to the following files would be overwritten by merge"”
  1. Yuri KanivetskyJul 23, 2022
  2. rsbecker@nexbridge.comJul 23, 2022
  3. brian m. carlsonJul 23, 2022
  4. Junio C HamanoJul 23, 2022
  5. Junio C HamanoJul 23, 2022
  6. Yuri KanivetskyJul 26, 2022

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.