Last active
April 22, 2017 01:05
-
-
Save cbfrance/e5eaf5dff1f234dd9a42b2899b5493e0 to your computer and use it in GitHub Desktop.
Truncate a repo at an arbitrary point
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 filter-branch --parent-filter ' | |
read parent | |
if [ "$parent" = "-p <COMMIT ID>" ] | |
then | |
echo | |
else | |
echo "$parent" | |
fi' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment