Remove old and add new git in android studio

You can remove GIT from your Android Studio Project in File → Settings → Version Control → In VCS select and Apply.

enter image description here

Then you can add it back in VSC Menu → Enable Version Control Integration → Select GIT → OK button.

enter image description here


Just a simple way

Open the terminal in android studio.

git remote set-url origin <NEW GIT URL>

now the project url is changed from old link to new one. Then you can use >

git init

and upload your files. Happy coding :)


In order to drop the current git repository and create a new one you need to:

  • Go to the project's directory: cd PROJECT_DIRECTORY

  • Remove all the git specific files: rm -rf $(find . -name ".git*")

  • Initialize a new git repository: git init

This doesn't remove your project's files, only git configs