Please enable JS

Show recent Git branches used

Print the most recent git branches used.
July 19/Brian Young/Software

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.

  1. git for-each-ref --sort=-committerdate refs/heads/ | head -10


RELATED POSTS


Comments/ 0


LEAVE A COMMENT

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
But why?

My random thoughts and documentation on the various hardware and software projects that occupy my day-to-day. My only hope is that other people can benefit from my notes.

Recent posts
Categories