Skip to content

Instantly share code, notes, and snippets.

@knzconnor
Created March 30, 2009 02:02
Show Gist options
  • Save knzconnor/87602 to your computer and use it in GitHub Desktop.
Save knzconnor/87602 to your computer and use it in GitHub Desktop.
some git directory filtering
git filter-branch -f --subdirectory-filter 'directory' #promote
git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch directory' HEAD #delete
#http://git.or.cz/gitwiki/GraftPoint
echo "$commit-id $graft-id" >> .git/info/grafts
git filter-branch $graft-id..HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment