git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andrew Ardill <andrew.ardill@gmail.com>
Cc: Daniil S <ds98s3a@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git doesn't save capitalization change in file names.
Date: Tue, 12 Jan 2016 09:02:21 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1601120900380.2964@virtualbox> (raw)
In-Reply-To: <CAH5451=-RkyYs3UJHUvvYHSrNODzW4dmAQDHU_Jo-Wf4Oa7Dew@mail.gmail.com>

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.

> > 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

  reply	other threads:[~2016-01-12  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  2:06 Git doesn't save capitalization change in file names Daniil S
2016-01-12  3:46 ` Andrew Ardill
2016-01-12  8:02   ` Johannes Schindelin [this message]
2016-01-12  9:58     ` Torsten Bögershausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1601120900380.2964@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=andrew.ardill@gmail.com \
    --cc=ds98s3a@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).