I am more familiar with using git on the command line (MacOS, especially). However, I sometimes try to use the Android Studio VCS "commit", as it is sometimes slightly faster to use. The weird problem that I came across today is that Android's Studio git "commit" does not see my 4 modified files, whereas from the command line, git status
shows clearly the 4 modified files. I have seen this Stack Overflow post and I have checked it is not for any of these reasons (like, not adding the file to the git repository, or it is stashed, etc,). Besides, since git status
shows the files, they are clearly in the repo, they are not stashed, and they are modified.
Here are the screenshots from Android Studio and from the command line showing the discrepancy.
Some other things I checked:
- The project path in Android Studio matches with the path on the command line. (so I'm not looking at a different copy of the git repo)
- My .gitignore is not excluding those 4 modified files. In any case, even if it is, it should be doing that for both the command line git and the Android Studio git, right?
- The "path to Git executable" setting in Android Studio is
/usr/bin/git
, same as what I get withwhich git
from the command line.
Any ideas what may be the problem?
ps. I may have encountered such a problem before, and just proceeded to use the command line. But this time, I hope to learn something new about the Android Studio git integration :-).