2

I'm trying to rebase my branch and squash most of my commits. When I do so, I get the following error:

error: The following untracked working tree files would be overwritten by merge:
src/components/rtbDsp/RtbDspHeader.jsx
src/components/rtbDsp/RtbDspManager.jsx
Please move or remove them before you merge.
Aborting
hint: Could not execute the todo command
hint: 
hint:     squash cbb99a2a11499fb58a14241783d0d8fb1942a130 AM-485-dsps-edit fix case names
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 cbb99a2... AM-485-dsps-edit fix case names

I'm at a loss for what to do. I tried removing the files, but then it just happens in the next commit it tries to rebase. I tried to delete the commit, but I get the same error.

What happened is the files were renamed from 'rtbDspManager' to RtbDspManager. For some reason those files got marked as untracked, but aren't untracked anymore.

Ellie Maynard
  • 115
  • 1
  • 6
  • 1
    It sounds like your worktree might be on a case-insensitive filesystem, but your repo might not be configured the right way to work on such a filesystem. If that's the case, you might have better luck by setting core.ignorecase and retrying the rebase. See https://git-scm.com/docs/git-config . BUT I would urge caution. If you're in this situation, and especially if you don't know why, then using the repo in a case-insensitive environment may not be safe. At best you should carefully examine the resulting repo, and at worst you may just need to work in a different envrionment – Mark Adelsberger Feb 29 '20 at 03:03
  • @MarkAdelsberger yes I'm working on MacOS, and the problem came about because it's case insensitive, and when I changed core.ignorecase to false, then changed the filenames, and commited to the repo, that is the commit that goes haywire in my rebase. There were dozens of commits after that one though, and I don't want to lose all of that work. – Ellie Maynard Mar 03 '20 at 01:36

0 Answers0