Git seeing imaginary files (case sensitivity)

This question already has an answer here:

  • How do I commit case-sensitive only filename changes in Git?

    8 answers

  • How to prevent git from committing two files with names differing only in case?
  • Is git not case sensitive?
  • git status reports modified files in a freshly cloned repo
  • Git SVN case sensitive folder names
  • git conflict with differently cased directory name
  • Git shows status clean, but checkout complains about overwriting untracked files
  • Git ignore all except subfolder
  • dropbox-style svn/git/mercurial?: auto-commit upon change and auto-checkout
  • XCode Source Control History not showing files
  • EGit : How to prevent fast-forward merge?
  • Why are my .csproj files getting messed up after a git rebase?
  • Are git repository names case sensitive?
  • One Solution collect form web for “Git seeing imaginary files (case sensitivity)”

    I think this is just a result of some common confusion that occurs when renaming files. Basically, in this case you need to git add both the “removed” (lowercase) and “added” (uppercase) files.

    As a test, if you enter git add --all you should get some result like “Renamed: server.h -> Server.h”. If this doesn’t occur, simply enter git reset HEAD . to get back to how you were before.

    Although if you’ve got more complicated changes than what you indicate in your question, and you’re afraid of losing some other modification (s), you might also want to look into the git stash command.

    Git Baby is a git and github fan, let's start git clone.