Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Remove reference to remote repository

tricpony
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 23, 2019

I have a local repository that I started to push to GitHub and before completion I decided to push it to BitBucket instead.  Now I am stuck because attempts to add my BitBucket url like so: 

git remote add origin https://tricpony@bitbucket.org/tricpony/timetracker_osx.git

fatal: remote origin already exists

Attempts to run this comment: 

git remote rm git@github.com:tricpony/TimeTracker_OSX.git

fatal: No such remote: git@github.com:tricpony/TimeTracker_OSX.git

Poydras:TimeTracker aarthur$ git remote -v

origin https://github.com/tricpony/TimeTracker_OSX.git (fetch)

origin https://github.com/tricpony/TimeTracker_OSX.git (push)

Also tried git fetch -p, prompted me for credentials - this failed too.  Any suggestions would be great.  Please help!!

3 answers

3 accepted

3 votes
Answer accepted
Julius Davies _bit-booster_com_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2019
git remote set-url origin [url]

 

In this case:

git remote set-url origin https://tricpony@bitbucket.org/tricpony/timetracker_osx.git 
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2019

This is the answer I was coming here to post.

Like Marty likes this
1 vote
Answer accepted
tricpony
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2019

You can actually manually edit the config file to remove it.

0 votes
Answer accepted
Marty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2019

Hi Brian,

I think you want to use git remote remove <name> rather than git remote rm

If that doesn't work for you, I'd recommend reading the help file at git remote --help

I hope that helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events