Created
September 25, 2016 00:25
-
-
Save cuibonobo/7573208857572550ffa5c70808ab1fa1 to your computer and use it in GitHub Desktop.
Splitting a repo (on git versions 1.7.11+, this is done with git subtree)
This file contains hidden or 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
#/bin/bash | |
git clone unicorn unicorn-calendar | |
cd unicorn-calendar | |
git filter-branch --prune-empty --subdirectory-filter apps/calendar master | |
git reset --hard | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
git reflog expire --expire=now --all | |
git gc --aggressive --prune=now | |
git remote rm origin | |
# Add a new origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment