On Fri, 2008-08-15 at 15:58 +0200, Michael J Gruber wrote: > A while ago I "complained" that rebase would skip empty commits. You > might experiment with that. Alternatively, the following works for me: > > git filter-branch --commit-filter 'cmd="git commit-tree"; test `git show > --pretty=oneline $GIT_COMMIT|wc -l` = 1 && cmd="skip_commit"; $cmd "$@"' > -- --all > > This skips all commits which introduce no diff. It will not remove > branches or tags which are related only to those subdirs. > > I am sure there will be more elegant ways to do that (esp. the test with > wc). something like this should work: --commit-filter 'if [ "$1" = `git rev-parse HEAD^{tree}` ]; then skip_commit "$@"; else git commit-tree "$@"; fi' Sam. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html