I was following the instructions at https://confluence.atlassian.com/bitbucket/add-unversioned-code-to-a-repository-877177133.html
I included the last 2 steps from the link above ...
% git remote add origin https://firstname.lastname@example.org/...
fatal: remote origin already exists
% git push -u origin -all
![rejected] master->master (fetch first)
error: failed to push some refs to 'https..'
Obviously I did something wrong. Any guidance appreciated.
The error you see means that there's already a remote with name origin registered in your repository. Git repository can have arbitrary number of named remotes. To list them along with their URLs you can run this command:
$ git remote -v
origin email@example.com:dpenkin/test-repo.git (fetch)
origin firstname.lastname@example.org:dpenkin/test-repo.git (push)
In this example I have just one remote called origin with two URLs: one for fetching, one for pushing (they can be configured independently, but in most cases they are same).
So I'd recommend you to do the following:
git remote set-url origin <url>
git remote remove origin
git remote add <remote-name> <url>
git push <remote-name> <branch-name>
Hope this helps. Let me know if you have any questions.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events