Last active
May 15, 2016 18:12
-
-
Save burnash/f684b7b0f03547ddc4d6b37b5d366b7c to your computer and use it in GitHub Desktop.
Move a Git branch out into its own repository
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
mkdir repo-name.git | |
cd repo-name.git | |
git --bare init | |
cd /path/to/existing/repo | |
git push /path/to/repo-name.git branch-to-move:master | |
# Add remote | |
cd /path/to/repo-name.git | |
git remote add origin https://github.com/username/repo-name.git | |
# Push to remote | |
git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment