• Shopping Cart Shopping Cart
    0Shopping Cart
London App Developer
  • Courses
  • Consulting
  • Tutorials
  • About
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Git logo on a bright green background image
Android Studio, Git

How to remove a git remote

In the comments of my article How to use GitHub with Android Studio 1.x, Cynthia gets the following error:

can't add remote
fatal: remote origin already exists.
during execution git remote add origin

Unfortunately, it seems that Android Studio doesn’t offer any way to modify/add/remove git remotes from your repository. However you can still remove it by following the below steps. I am using Windows 8.1 but it should work on other operating systems (for Mac/Linux just replace command line with the console or terminal).

First, navigate to the root of your project in the file system, right click the background of the directory and select Git Bash:

Andorid Studio 1.x root project directory

This will bring up the git console. In the git console type the following command:

git remote rm origin
Git remove remote

The git remote will now be removed from the repository.

Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://i0.wp.com/londonappdeveloper.com/wp-content/uploads/2015/02/How-to-remove-a-git-remote.png?fit=277%2C223&ssl=1 223 277 mark https://londonappdeveloper.com/wp-content/uploads/2018/12/lon_website_logo-300x110.png mark2015-02-15 15:06:142022-01-12 10:32:46How to remove a git remote
5 replies
  1. Abhilash
    Abhilash says:
    June 25, 2015 at 10:37 pm

    Hi there,
    Even i faced the same issue and followed your advice.Well now i am able to share on github again.But it is again creating an old repository which i had deleted a while ago.If i try to share again, i again get the error
    can’t add remote
    fatal: remote origin already exists.
    during execution git remote add github

    .Bottom line is an old repository of mine keeps recreating if i try to share some other project from android studio :(.
    Please help

    Reply
  2. Random Guy
    Random Guy says:
    December 5, 2015 at 7:46 pm

    Helped. Thanks,

    Reply
  3. Siyath kasali
    Siyath kasali says:
    February 1, 2016 at 4:58 pm

    I did this, Again it shows the same error
    fatal: remote github already exits blah blah blah 🙁

    Reply
  4. shivam vishnoi
    shivam vishnoi says:
    June 7, 2016 at 7:05 am

    it show the same error

    Reply
  5. timmeratoo bixbotter
    timmeratoo bixbotter says:
    October 6, 2016 at 8:59 pm

    worked for me! Thanks

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Pages

  • About
  • Consulting
  • Home
  • Tutorials

Categories

  • AI
  • Android
  • Android Studio
  • Angular
  • Aptana Studio
  • AWS
  • Bootstrap
  • Career advice
  • Celery
  • Databases
  • Deployment
  • DevOps
  • Django
  • Django REST Framework
  • Docker
  • Eclipse
  • Getting Help
  • Git
  • Git Bash
  • Git Flow
  • GitHub Actions
  • Google App Engine
  • IDE
  • Ionic Framework
  • iOS
  • JavaScript
  • Job Search
  • Links
  • Linux
  • Mac OS X
  • macOS
  • Node.JS
  • OpenAI
  • PGAdmin
  • Postgres
  • Productivity
  • Python
  • React
  • Salt Stack
  • Stack Overflow
  • Tools
  • Travis-CI
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Vagrant
  • VSCode
  • WebSockets
  • Windows 10
  • WordPress

London App Developer Ltd,

71-75 Shelton Street, Covent Garden, London, United Kingdom, WC2H 9JQ

Company registration number: 09718346

© London App Developer - London App Developer Ltd, Company Registration Number: 09718346, VAT: GB224061842
  • Link to X
  • Link to Youtube
  • Link to Facebook
  • Link to Reddit
Link to: How to use GitHub with Android Studio 1.x Link to: How to use GitHub with Android Studio 1.x How to use GitHub with Android Studio 1.xGithub and Android Studio software logos on a yellow background image Link to: How to clone a GitHub project on Android Studio Link to: How to clone a GitHub project on Android Studio Android and Github software logos on a turquoise backgroundHow to clone a GitHub project on Android Studio
Scroll to top Scroll to top Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

OKLearn more

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Google Analytics Cookies

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Other cookies

The following cookies are also needed - You can choose if you want to allow them:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept settingsHide notification only