queen.raae.codes · a developer’s logbook
1 min read

Lost in a sea of local branches? `--sort` might help!

Written in 2022, 4 years ago. Tools and advice may have moved on since.

If you are like me, never really cleaning up your local Git branches, you might feel a little lost when coming back to a project.

But I have a handy tip for us:

git branch --sort=-committerdate  # DESC

Sorting branches by the last commit date are super duper handy; you can even flip it around and get a list of the branches we maybe should stop hoarding.

git branch --sort=committerdate  # ASC

 
All the best,
Queen Raae

PS: Are you close to London? Today at 17:00, there is an informal piratical get-together in Chelsea with the Pirate Princess and me. Reply, and I’ll send you the details.

Join the crew!

All the shenanigans from me and my piratical family, straight to your inbox.

Search the log

↑↓ to move · Enter to open · Esc to close All entries →