Created
March 16, 2020 12:28
-
-
Save jamesmthornton/1d25924e00a55c0b6ee11527323328dd to your computer and use it in GitHub Desktop.
git disconnect local repository from remote origin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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