Re: Git doesn't save capitalization change in file names.
Hi,
On Tue, 12 Jan 2016, Andrew Ardill wrote:
> On 12 January 2016 at 13:06, Daniil S <ds98s3a@gmail.com> wrote:
> >
> > So I've now encountered this with both GitHub and BitBucket, Windows
> > and Linux versions, so I'm fairly sure it's git's fault.
I highly doubt that the Linux variety of Git displays this problem, unless it is run on a case-insensitive file system.
Show 14 quoted lines
> > Example: if file named "Pathfinding.java" was renamed to
> > "PathFinding.java" and that change is then committed, filename won't
> > change in repository.
>
> This actually comes down to the file system you use, as git itself does
> keep track of the capitalisation of file names; if the file system is
> case insensitive (Mac OSX being the typical example) then you can run
> into weird issues when files change case.
>
> For example, the following two search results:
>
> https://stackoverflow.com/questions/10523849/changing-capitalization-of-filenames-in-git
>
> https://ocroquette.wordpress.com/2014/07/08/git-capitalization-of-file-names-and-name-conflicts/
I'd like to offer the most common work-around:
git mv Pathfinding.java Pathfinding.java.rename git mv Pathfinding.java.rename PathFinding.java
Ciao, Johannes