A simple command-line utility to list your git branches by date.
I've Googled way too many times how to list your git branches by date and since the command is too complicated to actually remember or type out I decided to make this a ruby gem that you can execute from the command line.
I tend to create a lot of branches, but I can never remember the exact names and typing git branch
doesn't sort by date.
This is the stackoverflow page I kept referring to all the time.
Install it yourself as:
$ gem install branches
Just type:
$ branches
from the command line inside of a git repo.
If you have a lot of branches you can combine(pipe) branches
with the head
command like this:
$ branches | head
- Fork it ( https://github.com/oblakeerickson/branches/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request