dotfiles/scripts/git_logs
Michael Grote 78bda4fdb2 bash: git* change symlink direction
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-06-05 20:15:24 +02:00

10 lines
456 B
Bash
Executable file

#!/bin/bash
# https://git-scm.com/docs/pretty-formats
# https://stackoverflow.com/questions/3631005/git-log-tabular-formatting
# https://stackoverflow.com/questions/7736781/how-to-make-git-log-not-prompt-to-continue
if [ -z "$1" ]; then
ncommits=30;
else
ncommits="$1";
fi;
git log --pretty=format:'%C(auto) %<|(16,trunc)%h %Cred %G?%Creset %<|(60,trunc)%s %<(20,trunc)%Cgreen%cr%Creset %<(15,trunc)%Cblue%an%Creset %Cred%D' --graph --all -"$ncommits"