Git did not recognize file rename

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

Unfortunately, I gitdid not recognize this change. Therefore, when someone clones or pulls my repository, he or she will have to manually rename it, because otherwise the project cannot build, because this class is used in other classes.

How do I make it gitrecognize this change for commit and push it to the repository?

+4
source share
1 answer

Use the move functiongit

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

EDIT: Added quotes according to QPaysTaxes great offer.

+7
source

Source: https://habr.com/ru/post/1599636/


All Articles