Git - remove commits with empty changeset using filter-branch?

Just add on the --prune-empty option: git filter-branch --tree-filter 'rm -r -f my_folder' --prune-empty -f HEAD (And of course, if you have other refs, you might want to rewrite everything with -- --all instead of just HEAD. ) Note that this isn't compatible with --commit-filter; in that case, Charles Bailey has your answer.

Just looking a the documentation for filter-branch, you should be able to do this: git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' HEAD.

This works too if I use the -f flag – Paul Pladijs Mar 21 '11 at 15:00 +1 for this. Very useful if you have converted an svn repository, which normally generates a lot of empty commits – Fabio Jun 20 '11 at 22:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions