Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can try:</p> <ul> <li><code>"git mv -f foo.txt Foo.txt"</code> (note: this is <a href="https://stackoverflow.com/a/24979063/6309">no longer needed since git 2.0.1</a>) </li> <li>to set <code>ignorecase</code> to false in the config file.</li> </ul> <hr> <p>But the issue of case (on Windows for instance) is described in the <a href="http://code.google.com/p/msysgit/issues/detail?id=228" rel="nofollow noreferrer">msysgit issue 228</a> (again: this should <a href="https://stackoverflow.com/a/24979063/6309">now -- June 2014 -- work with git 2.0.1</a>)</p> <blockquote> <p>there is always an option to set <code>ignorecase</code> to false in the config file that will force Unix like Git semantics on top of NTFS.<br> Git supports this behavior but it is not the default - from NTFS point of view <code>a.txt</code> and <code>A.txt</code> are the same thing - so Git tries to preserve that as most users would expect</p> </blockquote> <p></p> <blockquote> <p>As a better workaround, you can </p> <pre><code>git mv foo.txt foo.txt.tmp &amp;&amp; git mv foo.txt.tmp Foo.txt </code></pre> <p>, which also changes the case of the file as stored on disk.</p> </blockquote> <p>This blog post <a href="http://www.paperplanes.de/2008/9/24/git_bits_renaming_with_lowercase.html" rel="nofollow noreferrer">illustrates the same issue on MacOs</a> during a rebase:</p> <blockquote> <p>The default on Mac OS X file systems is that they are case-insensitive. <code>FFFFFF.gif</code> is the same as <code>ffffff.gif</code>.</p> <p>If you delete the file in question, just from the file system, not from the Git index, mind you, you can merge the branch in question, and have it restore the file as if nothing happened. </p> <p>The steps are pretty simple:</p> <pre><code>$ rm file/in/question.gif $ git merge trunk </code></pre> </blockquote> <hr> <p>Anyhow, <a href="https://stackoverflow.com/questions/1094269/whats-the-purpose-of-git-mv">remember what git mv stands for</a>:</p> <pre><code>mv oldname newname git add newname git rm oldname </code></pre> <p>, so if <code>newname</code> and <code>oldname</code> clash, you need to make them different (even if it is only for a short period of time), hence the <code>git mv foo.txt foo.txt.tmp &amp;&amp; git mv foo.txt.tmp Foo.txt</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload