From: <rsbecker@nexbridge.com>
To: "'Yuri Kanivetsky'" <yuri.kanivetsky@gmail.com>, <git@vger.kernel.org>
Subject: RE: Dropbox and "Your local changes to the following files would be overwritten by merge"
Date: Sat, 23 Jul 2022 09:16:20 -0400 [thread overview]
Message-ID: <01bf01d89e96$699539e0$3cbfada0$@nexbridge.com> (raw)
In-Reply-To: <CAMhVC3acU06uBDAjd5LEiCvuf8=XW_1RYVVt7CdKr-JqB7cRFA@mail.gmail.com>
On July 23, 2022 8:40 AM, Yuri Kanivetsky wrote:
>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.
Is DropBox 100% up to date when the operation is run? It uses timestamps to determine whether files changed. Git uses SHA1. So, they each have a different perspective on what is changed. A git status before the operation would tell you what is modified prior to the merge, which could be something DropBox is updating or is pending an update. You could try to do a git stash push prior to the merge and then a git stash pop to isolate whatever DropBox is doing at the time.
--Randall
next prev parent reply other threads:[~2022-07-23 13:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 12:40 Dropbox and "Your local changes to the following files would be overwritten by merge" Yuri Kanivetsky
2022-07-23 13:16 ` rsbecker [this message]
2022-07-23 14:38 ` brian m. carlson
2022-07-23 18:09 ` Junio C Hamano
2022-07-23 18:19 ` Junio C Hamano
2022-07-26 2:38 ` Yuri Kanivetsky
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='01bf01d89e96$699539e0$3cbfada0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=yuri.kanivetsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).