Open jakub-g opened 4 years ago
function gbb { NUM=${1:-10}; git for-each-ref --sort=-committerdate --format="%(committerdate:short) %(refname:short)" refs/heads/ | head -${NUM} | xargs -n2 sh -c 'echo -n $1 $2; ANNO=".git/_annotations_/$2"; if [ -f "$ANNO" ] ; then echo -e -n " --> \033[36m"$(cat "$ANNO")"\033[0m"; fi; echo' sh; } function gann { FOLDER=./.git/_annotations_/; mkdir -p $FOLDER; BRANCH=$(git rev-parse --abbrev-ref HEAD); echo "$@" > "${FOLDER}/${BRANCH}"; } function gannx { FOLDER=./.git/_annotations_/; mkdir -p $FOLDER; BRANCH="$1"; echo "${@:2}" > "${FOLDER}/${BRANCH}"; }
Usage:
gann Update webpack config gbb gbb 20
alias gbx='git for-each-ref --sort=-committerdate --format="%(committerdate:short) %(refname:short) %(color:cyan) %(contents:subject)" refs/heads/'
Usage: