Skip to content

Instantly share code, notes, and snippets.

@jamesmthornton
Created March 16, 2020 12:28
Show Gist options
  • Save jamesmthornton/1d25924e00a55c0b6ee11527323328dd to your computer and use it in GitHub Desktop.
Save jamesmthornton/1d25924e00a55c0b6ee11527323328dd to your computer and use it in GitHub Desktop.
git disconnect local repository from remote origin
# make sure we're on development branch
git checkout development
# disconnect local files from remote origin, as in cases where source files are templates (e.g no fork)
git remote rm origin
# connect local files to intended remote origin we're pushing to
git add origin https://github.com/username/new-repo.git
# push changes
git push -u origin development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment