I have a file in my project that I renamed a while back. Say it used to be called Mydog and I changed it to MyDog. But lately, sometimes when I pull from Git it keeps returning Mydog as the file name. Notice: the class name is MyDog all the time, but the file name is Mydog in those pull instances. Each time that happens, I simply change the name back to MyDog. Right now I tried to compare MyDog on two branches, say branch food and branch toy. And it says the file does not exist on the branch! I am in Android Studio and I am looking at the file! So if I am on branch food and I say to compare with branch toy, it says the file does not exist on branch toy. So I switched to branch toy and tried to compare with branch food. It now says the file MyDog does not exist on branch food. Any help?
Asked
Active
Viewed 1,755 times
0
-
@DanielBeck the link you provided solved my problem. Thanks. – Nouvel Travay May 26 '16 at 21:08
1 Answers
0
You probably haven't committed you changes after renaming the file. Maybe you even committed something, but forgot to stage this change beforehand. Depending on how you rename it, it may not be automatically staged and that's why you might have missed it in you commit. If I were you, I'd rename it again and check its status via "git status" through the terminal (or whatever GUI tool you are using) and stage it before committing.

Jodevan
- 732
- 1
- 6
- 20