Tutorial by Examples

Git shortlog is used to summarize the git log outputs and group the commits by author. By default, all commit messages are shown but argument --summary or -s skips the messages and gives a list of authors with their total number of commits. --numbered or -n changes the ordering from alphabetical (...
git log --pretty=format:"%ai" | awk '{print " : "$1}' | sort -r | uniq -c
git log --pretty=oneline |wc -l
for k in `git branch -a | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort
git ls-tree -r HEAD | sed -Ee 's/^.{53}//' | \ while read filename; do file "$filename"; done | \ grep -E ': .*text' | sed -E -e 's/: .*//' | \ while read filename; do git blame --line-porcelain "$filename"; done | \ sed -n 's/^author //p' | \ sort | uniq -c | sort -rn
git log --pretty=format:"%Cgreen%ci %Cblue%cn %Cgreen%cr%Creset %s" This will give a nice overview of all commits (1 per line) with date, user and commit message. The --pretty option has many placeholders, each starting with %. All options can be found here
To list all the git repository locations on your you can run the following find $HOME -type d -name ".git" Assuming you have locate, this should be much faster: locate .git |grep git$ If you have gnu locate or mlocate, this will select only the git dirs: locate -ber \\.git$
In order to get the total number of commits that each developer or contributor has made on a repository, you can simply use the git shortlog: git shortlog -s which provides the author names and number of commits by each one. Additionally, if you want to have the results calculated on all branch...

Page 1 of 1