Skip to content

A short snippet to view the last checked-out branches

Notifications You must be signed in to change notification settings

galabra/git-last

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

git-last 🤔

Are you tired of going over merged PRs just to find the last branch you were working on?
Fear not - we got you covered!

By adding the following alias to your terminal, you'll be able to view the last 10 branches that you checked-out to:

alias git-last="git for-each-ref --sort=-committerdate refs/heads/ --count=10 --format='%(refname:short)'"

Then it's as easy as it gets:

image

Note this depends on the directory you're in - it'll show the relevant branches per repository.

About

A short snippet to view the last checked-out branches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published