Skip to content

Instantly share code, notes, and snippets.

@jchannon
Last active December 6, 2015 10:11
Show Gist options
  • Save jchannon/3e1e3fc45778ef4b196e to your computer and use it in GitHub Desktop.
Save jchannon/3e1e3fc45778ef4b196e to your computer and use it in GitHub Desktop.
List commits that ONLY contain whitespace changes. What about those that have valid changes and whitespace changes??
branch=dnx
for commit in $(git rev-list --no-merges $branch); do
if [ -z "$(git diff -b $commit^..$commit)" ]; then
echo "$commit only modifies whitespace."
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment