You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
sync problem with file with lower case and upper case #1520
Hello,
the name file is not changed when it's just type case is changed.
That can cause a trouble when we come back to old version or when other people download the file.
Or maybe I miss something to update the filename when the changement is only a upper case or lowr case.
hmmm thx for the advice but i'm not really confortable with this type of operation: I figure, I must do that in the terminal to targeting the folder of my project ?
Yep I contact us, but I don't have a time now to solve it, but i do that asap. If I understand well the support say the solution of @oprogramador is not really optimum because that can erase my file history. the fix proposition is :
Hey there Stan,
Thanks for writing in and I hope you are having a great day where you are.Taking a look at that issue, as the user mentions, it looks like it might be a local issue with your repository.
Can you try, locally, running:$ git mv :old_filename :new_filename Then run $ git commit -a -m ":commit_message" By using the git mv command you are telling git to move/rename the file - and by doing so continue to track the changes. In #1520 the commenter has mentioned removing and readding the files to git, this will destroy the history of these files - which is still a valid method if that's the desired process you have.
I hope this helps and please let me know if you face any further issues with this.Thanks Matt Barber
That seems very odd that @github would treat it like that.… But I suppose they're making the easy assumption. Still, the appropriate section @ Wikipedia currently says (emphasis mine)
In filesystems in Unix-like systems, filenames are usually case-sensitive (there can be separate readme.txt and Readme.txt files in the same directory). MacOS is somewhat unusual in that, by default, it uses HFS+ in a case-insensitive (so that there cannot be a readme.txt and a Readme.txt in the same directory) but case-preserving mode (so that a file created as readme.txt is shown as readme.txt and a file created as Readme.txt is shown as Readme.txt) by default. This causes some issues for developers and power users, because most other environments are case-sensitive, but many Mac Installers fail on case-sensitive file systems.
@oprogramador I disagree. The git|GitHub client should preserve case, even in cases when the OS &/or filesystem don't. Since MacOS does, I don't understand the above behavior @ all.
Update March 2021: These steps are more useful to apply in visual code editor like vscode or visual git tool. For command line see Option 2 proposed by @coolzoom in #1520 (comment)
Reacted by Stanislas Marçais / Knupel, Rocío Milla, Jason Killian, zavr-1, NicoDrouin, ancaan, sgoulas, Ivan Valverde, Hasan Sefa Ozalp, André and 16 more
Reacted by coolzoom, Kehinde Oriyomi ODETOLA and Aswin Koliyot
Reacted by Rajan Khade, coolzoom, mike_thecode and Aswin Koliyot
also, I found no need stage if you use git mv to rename.
for anyone who wishes to try, below are the examples of renaming a folder.
Good idea! But stage is more convenient and quick to apply these steps #1520 (comment) in visual code editor like vscode or visual git tool. Additionally Option 2 was not so easy to apply, may be because of my OS/git settings.
Activity
knupel commentedon Mar 13, 2019
Maybe more explicit:

oprogramador commentedon Mar 13, 2019
@StanLepunK
It's not about GitHub. It's a local problem on Mac.
A workaround if you want to change the case:
git add .git commit -m 'remove files'git checkout your-branch your-filemv UPPERCASE_NAME lowercase_namegit add .git commit -m 'add files'git rebase -i HEAD~2pickwithsquashknupel commentedon Mar 14, 2019
hmmm thx for the advice but i'm not really confortable with this type of operation: I figure, I must do that in the terminal to targeting the folder of my project ?
TPS commentedon Mar 14, 2019
@StanLepunK Did you contact GitHub support? What'd they say?
knupel commentedon Mar 15, 2019
Yep I contact us, but I don't have a time now to solve it, but i do that asap. If I understand well the support say the solution of @oprogramador is not really optimum because that can erase my file history. the fix proposition is :
Hey there Stan,
Thanks for writing in and I hope you are having a great day where you are.Taking a look at that issue, as the user mentions, it looks like it might be a local issue with your repository.
Can you try, locally, running:
$ git mv :old_filename :new_filenameThen run$ git commit -a -m ":commit_message"By using thegit mvcommand you are telling git to move/rename the file - and by doing so continue to track the changes. In #1520 the commenter has mentioned removing and readding the files to git, this will destroy the history of these files - which is still a valid method if that's the desired process you have.I hope this helps and please let me know if you face any further issues with this.Thanks Matt Barber
TPS commentedon Mar 15, 2019
That seems very odd that @github would treat it like that.… But I suppose they're making the easy assumption. Still, the appropriate section @ Wikipedia currently says (emphasis mine)
oprogramador commentedon Mar 17, 2019
@StanLepunK @TPS
Anyway I think, it's not a GitHub issue. It's just about how git and operating systems work.
TPS commentedon Mar 17, 2019
@oprogramador I disagree. The git|GitHub client should preserve case, even in cases when the OS &/or filesystem don't. Since MacOS does, I don't understand the above behavior @ all.
user4i commentedon Jan 2, 2020
📌📌📌
If you need to commit files renaming, just capitalization, and you have a problems with staging/commiting, as option
Update March 2021: These steps are more useful to apply in visual code editor like vscode or visual git tool. For command line see Option 2 proposed by @coolzoom in #1520 (comment)
knupel commentedon Jan 5, 2020
thanks for the tip
renamed about_us.HTML to *.html extension uppercase to lowercase. cha…
deleted about_us.HTML isaacs/github#1520
added about_us.html isaacs/github#1520
ivnlabs commentedon Mar 11, 2021
THANKS THIS DO THE JOB DONE
coolzoom commentedon Mar 31, 2021
Epic tips! Thanks.
also, I found no need stage if you use git mv to rename.
for anyone who wishes to try, below are the examples of renaming a folder.
Option 1 example based on @user4i :
Option 2 example based on #1520 (comment)
user4i commentedon Mar 31, 2021
Good idea! But stage is more convenient and quick to apply these steps #1520 (comment) in visual code editor like vscode or visual git tool. Additionally Option 2 was not so easy to apply, may be because of my OS/git settings.