I constantly forget which branch I was previously working on. This handy little script will output the last 10 lines of recent commits and displays their branch.
I'd suggest making an alias or a custom git command for convenience. I made a custom Git command called recent
.
git for-each-ref --sort=-committerdate refs/heads/ | head -10
Software engineer by profession, embedded systems tinkerer, husband, father, fantasy novel devourer, wine lush, beer and cheese connoisseur