From: Mason Date: Wed, 04 Mar 2015 14:49:25 GMT Subject: Re: Salvaging borked project history Message-ID: <54F71B75.7000104@free.fr> In-Reply-To: <54EF814D.1020105@free.fr> Mason wrote: > I was planning to write 'git diff -q commit^ commit' > to test for empty commits. Looks like I'll be needing > 'git diff commit^ commit | wc -l' instead? I wrote a script to generate the list of empty commits. git log --format="%h" --reverse 413cb08.. | while read H do if git diff --quiet $H^ $H; then echo $H; fi done >empty_commits But it turns out all this is unnecessary, as git-rebase will automatically filter empty commits! :-) Unless given the --keep-empty option, I presume. Thanks to everyone involved in making this great tool. Regards.