Skip to content

Instantly share code, notes, and snippets.

@amannocci
Last active Jan 14, 2017
Embed
What would you like to do?
A small script to extract some information about a git project
#!/bin/bash
IFS=$'\n'
# %H: commit hash
# %an: author name
# %ae: author email
# %aI: author date
# %cn: committer name
# %ce: committer email
# %cI: committer date
# %s: subject
for entry in $(git log --pretty="%H;%an;%ae;%aI;%cn;%ce;%cI;%s")
do
hash=$(echo ${entry} | awk -F ";" '{print $1}');
for file in $(git show ${hash} --format="" --name-only)
do
echo "${entry};${file}";
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment