#!/bin/bash
commits=$1
#Defaults commits to 10
if [ -z "$1" ];
then
commits=10
fi
while :
do
clear
git --no-pager log -$commits --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s' --abbrev-commit --date=relative
sleep 2
done