Skip to content

Instantly share code, notes, and snippets.

@yaplex
Created June 21, 2017 18:29
Show Gist options
  • Save yaplex/e33cc8577f5a2cd0011b1e20f4c8f420 to your computer and use it in GitHub Desktop.
Save yaplex/e33cc8577f5a2cd0011b1e20f4c8f420 to your computer and use it in GitHub Desktop.
# first check what is the origin name for your repository
git remote -v
# remove old origin (you wan't be able to push anymore)
git remote rm origin
# verify than no origin was removed successfuly
git remote -v
# add new origin, add there the url for your new repository
git remote add origin [email protected]:yaplex/my-new-repository.git
# push all code with complete history to new repository
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment