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
  3.  
  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
  8.  
  9. less /tmp/gitlist.text

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.