Skip to content

Instantly share code, notes, and snippets.

@Iristyle
Created August 28, 2013 00:28
Show Gist options
  • Save Iristyle/6360762 to your computer and use it in GitHub Desktop.
Save Iristyle/6360762 to your computer and use it in GitHub Desktop.
Rewrite git tree to add prefix to file paths
## rewrite the tree to add a prefix and trash some unnecessary files
git filter-branch --index-filter 'rm -f "$GIT_INDEX_FILE" && git read-tree --prefix=acceptance/ "$GIT_COMMIT" && git rm acceptance/.gitignore acceptance/Gemfile --ignore-unmatch' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment