Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git rebase issue with files of same name but different case

Tags:

git

I am fairly new to Git, and I am having a problem with doing a rebase, where it seems to show a file...

create.sql

and a file

Create.sql

The Create.sql is not staged, and does not physically exist anymore, but I cannot continue with the rebase... when I try git rebase --continue I get the following...

$ git rebase --continue
KeyBlade/KeyBlade.Database/_Pending/Create.sql: needs update
You must edit all merge conflicts and then
mark them as resolved using git add

Git status show the following...

/c/src/git ((c3760e6...)|REBASE)
$ git status
# Not currently on any branch.
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   KeyBlade/KeyBlade.Database/_Pending/create.sql
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   KeyBlade/KeyBlade.Database/_Pending/Create.sql
#

I am not sure what is going on, but if anyone can shed some light on how I can resolve this, it would be much appreciated.

like image 828
Mark Pearl Avatar asked Dec 22 '11 13:12

Mark Pearl


People also ask

Is git case-sensitive for file names?

Git is case-sensitive and your filesystem may not be - Weird folder merging on Windows - Scott Hanselman's Blog.

Why you should avoid git rebase?

Case 1: We should not do Rebase on branch that is public, i.e. if you are not alone working on that branch and branch exists locally as well as remotely rebasing is not a good choice on such branches and it can cause bubble commits.


1 Answers

for anyone else that has this issue I found a post at the following site...

https://tortoisegit.org/issue/830

In a nutshell, if you had a file name foo.txt and then it conflicts with a file called Foo.txt, you can use the following git command

git mv foo.txt Foo.txt --force

This solved my problem

like image 106
Mark Pearl Avatar answered Sep 17 '22 16:09

Mark Pearl