Created
September 28, 2016 22:30
-
-
Save ederrafo/e6569893f5130a4e5265bd9f75149266 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script para hacer diff solo a los archivos modificados | |
#!/bin/bash | |
FILES=`git ls-files -m` | |
for f in $FILES; do | |
#echo ${#f} | |
str=$(git diff $f) | |
printf "\n $str" | |
done | |
Script para ver archivos modificados | |
#!/bin/bash | |
FILES=`git ls-tree --name-only HEAD .` | |
MAXLEN=0 | |
IFS=$(echo -en "\n\b") | |
for f in $FILES; do | |
if [ ${#f} -gt $MAXLEN ]; then | |
MAXLEN=${#f} | |
fi | |
done | |
for f in $FILES; do | |
str=$(git log -1 --pretty=format:"%C(green)%cr%Creset %x09 %C(cyan)%h%Creset %s %C(yellow)(%cn)%Creset" $f) | |
printf "%-${MAXLEN}s -- %s\n" "$f" "$str" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment