Created
September 5, 2011 23:08
-
-
Save a2/1196131 to your computer and use it in GitHub Desktop.
Clones a subfolder into a new git repository.
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
git clone --no-hardlinks OLD_FLDR NEW_FLDR | |
cd NEW_FLDR | |
git filter-branch --prune-empty --subdirectory-filter ‘FLDR_TO_KEEP’ master | |
git remote rm origin | |
git update-ref -d refs/original/refs/heads/master | |
git reflog expire --expire=now --all | |
git repack -ad | |
git reset --hard | |
git gc --aggressive --prune=now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment