Posted 8 months ago. Visible to the public. Linked content.

Git shortcut to checkout recent branches

If you have fzf Archive installed, you may add an alias such as this to your ~/.bashrc:

Copy
alias recent-branch="git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | fzf | sed 's/\* //g' | xargs -I '{}' git checkout {}"

Now whenever you want to switch back and forth between your most recent branches, type recent-branch, select one and press enter.

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Avatar
Michael Leimstädtner
Last edit:
8 months ago
by Michael Leimstädtner
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Michael Leimstädtner to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more