问题描述:

I have an Android project on BitBucket that my colleagues and I are collaborating on. The problem is that, whenever I open the project in Android Studio for the first time after cloning, it leaves the local project directory inconsistent with the remote (because of auto-generated files).

In this situation, if my colleague commits any changes and if I try to pull them, git asks me to commit the changes that I have in local. As a result, I have to delete my local repository, clone it, and open it in Android Studio for it can work properly.

I tried using the default .gitignore file of Android Studio, but it doesn't solve the problem.

网友答案:

Add the files that are causing a problem to .gitignore, move them to another directory, commit (including deleting the files), then move them back. Then you should be fine.

相关阅读:
Top