title: Git case-sensitivity error -- renaming and committing from Android Studio
body: <p><br />
  For example, I have a file named <code>FOOBar.java</code> that I want to rename to <code>FooBar.java</code>. After trying lots of stuff, I get the error:
  <br /></p>
  
  <blockquote>
    <p><img src="https://i.stack.imgur.com/zZsPs.png" alt="enter image description here"> <br /><br /> <code>Error:error: pathspec 'app/src/main/java/blahblah/FooBar.java' did not match any file(s) known to git.</code></p>
  </blockquote>
  
  <p><hr />
  Things I have tried (not working, all produce the same error):
  <br /><br />
  <em>from Android Studio:</em></p>
  
  <ul>
  <li>deleting <code>FOOBar.java</code>, re-creating <code>FooBar.java</code>, adding/committing with Git</li>
  <li>refactoring/renaming the file, adding/committing with Git
  <li><kbd>File</kbd> --> <kbd>Invalidate Caches / Restart...</kbd>, then trying one of the above</li>
  <li><kbd>Rebuild Project</kbd> before/after any of the above
  </ul>
  
  <p><em>in the file system:</em></p>
  
  <ul>
  <li>deleting the <code>.gradle</code> folder in the project folder, then trying one of the above in Android Studio
  </ul>
  
  <p><em>from the Git command line:</em></p>
  
  <ul>
  <li><code>git mv FOOBar.java FooBar.java --force</code> then <code>git commit FooBar.java -m 'renamed from FOOBar.java to FooBar.java'</code></li>
  </ul>