Git didn't recognize rename of a file

I renamed one Java source file from Multiplechoice.java to MultipleChoice.java

Unfortunately git didn’t recognize this change. So when someone clones or pulls my repository he or she will have to do the renaming manually, because otherwise the project can’t build because this class is used in other classes.

  • can not using git to add directory recursively?
  • Undo git push to Assembla
  • Creating new git branch in eclipse
  • Git-svn merging and committing branches
  • .gitignore not ignoring .idea path
  • Git Conundrum: rm -r and .gitignore not working
  • How do I make git recognize this change in order to commit and push it to the repository?

  • Multiple git pull in one folder containing multiple repository
  • How does bug tracker/version control integration work with typical git workflows?
  • combine two bash commands into a one shortcut prompt
  • How can I amend a previous git commit
  • Macintosh Git SSH key setup
  • create build number in git-svn environment
  • One Solution collect form web for “Git didn't recognize rename of a file”

    Use git move function

    git mv "Multiplechoice.java" "MultipleChoice.java"
    

    EDIT: Added quotes as per QPaysTaxes excellent suggestion.

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