GIT.md - 14paxton/Linux Wiki

get changed lines

git log --shortstat --author "username"  --since "5 days ago" --until "today" \
    | egrep "file[s]* changed" \
    | sed 's/changed, \([0-9]\+ deletions\)/changed, 0 insertions(+), \1/g' \
    | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'

clone set commit

git clone [email protected]:14paxton/ScriptsAndSuch.git .; 
git remote set-url origin [email protected]:14paxton/ScriptsAndSuch.git;  
git fetch;
#git checkout master;
#git merge origin/master;
git add -A --ignore-errors;
git commit -am "script backup $(date +'%s')";
git push;