Show git repository diff of all files

/ Published in: Bash
Save to your folder(s)

Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. rm -rf /tmp/gitlist.text
  4. for f in $(echo -e "`git status | awk -F" " '{printf "%s\n", $3}' | tail -n+6 | head -n-7`"); do
  5. git diff $f >> /tmp/gitlist.text
  6. echo >> /tmp/gitlist.text
  7. done
  9. less /tmp/gitlist.text

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.