Skip to content

Instantly share code, notes, and snippets.

@josepsmartinez
Created January 8, 2026 12:21
Show Gist options
  • Select an option

  • Save josepsmartinez/9e577b59a29e00abd2076d996c4d991b to your computer and use it in GitHub Desktop.

Select an option

Save josepsmartinez/9e577b59a29e00abd2076d996c4d991b to your computer and use it in GitHub Desktop.
Clean changes on whitespacing
#!/bin/bash
git diff --name-only | while read file; do
git diff -w --quiet "$file" && \
git checkout "$file";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment