Skip to content

Instantly share code, notes, and snippets.

@ZachWatkins
Created October 31, 2020 03:03
Show Gist options
  • Save ZachWatkins/7a12ec1cc010125b84f0a144684403c4 to your computer and use it in GitHub Desktop.
Save ZachWatkins/7a12ec1cc010125b84f0a144684403c4 to your computer and use it in GitHub Desktop.
Client Report from Git Log
# Today's date
truestart="10/23/2020"
fnstart=$(date --date="$truestart" +"%Y-%m-%d-%I%M%p")
start=$(date --date="$truestart")
end=$(date)
br="----------------------------------------------------"
statuslog="updates-made-since-$fnstart.txt"
gitformat="%n[Change #%h]$br%nDate: %ad%nDescription: %s%nFiles Affected:"
# Empty file if it exists already.
if [ -f $statuslog ]
then
> $statuslog
fi
echo "Record of changes made to your website by Zachary Watkins" >> $statuslog
echo "Start: $start" >> $statuslog
echo "End: $end" >> $statuslog
echo "Key: M=modified, A=added" >> $statuslog
git --no-pager log --name-status --pretty="$gitformat" --since="$start" --until="$end" --abbrev-commit --date=local --reverse --output="$statuslog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment