Created
March 20, 2018 14:40
-
-
Save zeta709/b7eb552470e1331f164d3e03857db4ba to your computer and use it in GitHub Desktop.
git filter-branch example
This file contains hidden or 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
#!/bin/bash | |
git filter-branch --index-filter \ | |
'git rm --cached -qr --ignore-unmatch -- . && | |
git reset -q $GIT_COMMIT -- | |
bin/post-slack | |
zsh/functions/post-slack' | |
--prune-empty -- --all | |
git filter-branch -f --tree-filter \ | |
'mv -f zsh/functions/post-slack post-slack || | |
mv -f bin/post-slack post-slack || true' \ | |
--prune-empty -- --all | |
git rebase -i # and do some manual job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment