Aliases are good for fixed substitutions such as gco='git checkout'. I stop using one when the command needs to inspect input or quote an argument. Shell functions can bridge the gap, but a small script is easier to test and can travel between shells.
My rough rule is simple: the first conditional earns a file. Giving the shortcut a real name and a short help message also makes it less mysterious six months later.