To rename the file you can use the standard git mv
command.
Since Windows treats files with only changes in case as identical, you have to pass the -f
option to force a rename:
git mv -f name.java Name.java
If instead you want to ignore case changes, have a look at the question
How to make git ignore changes in case?.