Skip to content

Instantly share code, notes, and snippets.

@rstriquer
Created November 22, 2013 14:31
Show Gist options
  • Save rstriquer/7600754 to your computer and use it in GitHub Desktop.
Save rstriquer/7600754 to your computer and use it in GitHub Desktop.
Show git repository diff of all files creating a simple "/tmp/gitlist.text" file with all differences in it
#!/bin/bash
rm -rf /tmp/gitlist.text
for f in $(echo -e "`git status | awk -F" " '{printf "%s\n", $3}' | tail -n+6 | head -n-7`"); do
git diff $f >> /tmp/gitlist.text
echo >> /tmp/gitlist.text
done
less /tmp/gitlist.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment