Skip to content

Instantly share code, notes, and snippets.

@gaurish
Created April 25, 2011 12:13
Show Gist options
  • Save gaurish/940426 to your computer and use it in GitHub Desktop.
Save gaurish/940426 to your computer and use it in GitHub Desktop.
$ git remote add joyent [email protected]:repo
fatal: remote joyent already exists.
$ git remote rm joyent
$ git remote add joyent [email protected]:repo
$ git push joyent master
To [email protected]:repo
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:repo'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
@guiomie
Copy link

guiomie commented Dec 29, 2011

nevermind, I added -f and it worked.

@gaurish
Copy link
Author

gaurish commented Dec 29, 2011

I solved it by deleting the old repo but force push works too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment