Reputation: 347
Previously, I commit a change which have a file named login.java
and now I change to Login.java
and commit the change, but the error message shown below:
Error:Will not add file alias 'app/src/main/java/edu/ohiostate/sum/Login.java'
('app/src/main/java/edu/ohiostate/sum/login.java' already exists in index)
Upvotes: 3
Views: 1606
Reputation: 3669
The problem is that you are using Windows or Mac, which have (more or less) case insensitive file systems.
The easiest solution (took it from https://apple.stackexchange.com/a/51619) would be to rename the file to something completely different, commit, rename the file again to the name you want and commit again, this time amending the old commit.
If Android Studio does not support amend commits, you could go with the terminal commands from the answer above.
Upvotes: 6