There are a few things to remember. The script has to be in your path so that Git can use the script. Besides this, only imagination sets the boundaries:
- Open your favorite editor and insert the following lines into the file:
#!/bin/bash NUMBEROFCOMMITS=$(git log --all --oneline | wc -l)while :WHICHCOMMIT=$(( ( RANDOM % $NUMBEROFCOMMITS ) + 1 ))COMMITSUBJECT=$(git log --oneline --all -${WHICHCOMMIT} | tail -n1)COMMITSUBJECT_=$(echo "$COMMITSUBJECT" | cut -b1-60)do if [ $RANDOM -lt 14000 ]; then echo "${COMMITSUBJECT_} PASSED" elif [ $RANDOM -gt 15000 ]; then echo "${COMMITSUBJECT_} FAILED" fi done
- Save the file with the name git-likeaboss. This is a very simple script that will list random commit subjects with either ...