3 ms·
in .gitconfig: recent = for-each-ref --count=25 --sort=-committerdate refs/heads/ --format="%(refname:short)" so `git recent` lists the last 25 branches, an
by nicwolff 8y ago
in .gitconfig:
recent = for-each-ref --count=25 --sort=-committerdate refs/heads/ --format="%(refname:short)"
so `git recent` lists the last 25 branches, and then in .bashrc:
alias co='select br in $(git recent); do git co $br; break; done'
alias coo='select br in $(git br -r|grep -v "("|grep -v HEAD|cut -c3-|sed "s/^origin.//"); do git co $br; break; done'
and now `co` gives me a menu of recent local branches to check out, and `coo` does the same for remotes on origin