Last active
December 17, 2015 02:38
-
-
Save jacklund/5536712 to your computer and use it in GitHub Desktop.
Moving subdirectories in a git repository to be their own repositories
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
$ git clone repo-url | |
$ cd repo | |
$ git filter-branch --prune-empty --subdirectory-filter subdir-name master | |
$ git remote rm origin | |
$ git remote add new-repo-url | |
$ git push -u origin --all --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment