Skip to content

Instantly share code, notes, and snippets.

@racke
Created November 18, 2015 13:50
Show Gist options
  • Save racke/986943a9bff117b32473 to your computer and use it in GitHub Desktop.
Save racke/986943a9bff117b32473 to your computer and use it in GitHub Desktop.
Git filter branch
git filter-branch \
--prune-empty \
--index-filter '
git ls-tree -z -r --name-only --full-tree $GIT_COMMIT \
| grep -z -v "^applications/CalevoMobile/lib/CalevoMobile/Schema" \
| xargs -0 -r git rm --cached -r
' \
-- \
feature/split_out_schema
git filter-branch \
--subdirectory-filter applications/CalevoMobile \
-- feature/split_out_schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment