Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jmeridth/4382421 to your computer and use it in GitHub Desktop.

Select an option

Save jmeridth/4382421 to your computer and use it in GitHub Desktop.
list last commit in entire repository for each author
#!/bin/bash
function display() {
local result=$(git log -1 --all --pretty=format:'%cn - %cr (%cd) %h %s' --date-order --author=$1)
echo "$result"
}
function getauthors() {
git log --format='%ae' | sort -u
}
HEADER="<html><body>"
CONTENT=""
for i in $(getauthors)
do
DISPLAY=$(display $i)
CONTENT+="$DISPLAY<br/>"
done
FOOTER="</body></html>"
OUTPUT="$HEADER$CONTENT$FOOTER"
echo $OUTPUT
### to turn into html output: list_last_commit_in_entire_repository_for_each_author.sh > output.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment