DEV Community

Anton Ödman
Anton Ödman

Posted on

My Tiny Git CLI Tool I Use Daily To Improve My Git Workflow

Most developers work with Git on a daily basis. I would almost assume there are as many work flows as there are developers. I recently came upon a problem all over again. Finally I decided to create a tiny CLI application to solve the problem I was having, and I ended up using that so much that I changed my actual Git workflow.

The problem I was facing was the constant switching of branches. Bug fixes, features, dev reviews, and so much more. With long branch names like bugfix/<CATEGORY>-<ID>-long-descriptive-name, I always forgot the names of the branches.

Enter: git-recent-branch, my new very simple CLI tool.

Gif showing usage of git-recent-branch

Just run git-recent-branch (or rb as an alias), and you'll get a nice looking prompt, allowing you to checkout one of your 5 recent branches with on click on the keyboard. I use it almost all the time when switching branches.

It might be a bit of a shameless plug, but it really helped me a lot and who knows, other people might perhaps find it helpful.

The code is all open-source and available on Github for those who want to look or contribute. Or feel free to hit me up on Twitter if you want to talk code.

Happy coding!

Top comments (0)