Difference between upper and lower case in Git and SourceTree

I was maintaining a repo through a source tree and I ran into an issue where one file has two references to it, one in lower case and one in upper case. This happened after I changed the title case slightly. If I try to delete it, both are deleted, and if I try to execute them, it will always remain in the working copy.

I tried mv

on the file to see if I can get it to only use uppercase letters, but I still have a duplicate link issue.

If anyone has a solution (and an explanation of what's going on) I'd love to hear it.

+3


source to share


1 answer


There is a similar issue with the renamed file when using SourceTree .

The usual workaround is to return to the command line and:



for example, if you want to rename " kh.png

" to " kh.png

", go to the git repo from the command line and run:

mv kh.png temp.png 
# (or "mv KH.png temp.png" if kh.png as already been renamed to KH.png under Source Tree)
git add -A
git commit -m "renaming kh.png to KH.png"
mv temp.png KH.png
git add -A
git commit --amend -m "Renamed file.txt to File.txt"

      

+3


source







All Articles