This is basically a subset of the oh-my-zsh git plugin aliases, plus some of my own aliases, plus a few handy functions.
You can source this directly, or (recommended) use one of the many zsh plugin managers around (my preference: zgen).
See also my fzf.zsh plugin, which contains a
handy command called sb
to quickly switch between git branches using a fancy
fuzzy-matching menu driven by the awesome
fzf.
Andy Gimblett, andy@barefootcode.com, 2019