Skip to content

Instantly share code, notes, and snippets.

@jonathanmoore
Created February 28, 2014 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanmoore/9282035 to your computer and use it in GitHub Desktop.
Save jonathanmoore/9282035 to your computer and use it in GitHub Desktop.

Steps to break one large repo into multiple repos based off of DIRNAME

git filter-branch --prune-empty --subdirectory-filter DIRNAME master

rm -rf .git/refs/original/ && git reflog expire --all &&  git gc --aggressive --prune=now

git clean -fdx

git reflog expire --all --expire-unreachable=0
git repack -A -d
git prune
git remote rm origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment