Reputation:
I have been trying to add my android studio project to github for a while now and keep getting this error: Can't add remote fatal: remote origin already exists. during executing git remote add origin
why am I getting this? does anybody have any advice as to how to add android studio projects to github?
Upvotes: 0
Views: 148
Reputation: 10661
The problem is, you have already set a remote destination. So you have to remove the current remote. The best possible solution is using command line, navigate to projects root directory.
git remote rm origin
This removes the current remote. Then you can add new remote.
git remote add origin https://github.com/user/repo.git
Upvotes: 0
Reputation: 10697
Adding your Android Studio project on Github is really simple with the latest versions of Android Studio. Just go to VCS > Import into Version Control > Share project on Github. Add your username and password. And you're done. Once that is done, go to VCS > Git and you'll get all the Git options(adding, committing, pushing etc).
Upvotes: 1