Where developers come to connect, share, build and be inspired.


Show git branches sorted by latest commit


Note: coderwall's markdown pre-processor seems to think that -- indicate Haskell comments in the code blocks and is hiding them. I'm going to not use code blocks until it works. Sorry about that.

git config --global alias.latest "for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short)'"


$ cd ~/Code/rails/rails && git latest

2012-11-19 origin/master
2012-11-19 origin/HEAD
2012-11-19 master
2012-11-19 origin/3-2-stable
2012-11-03 origin/encrypted_cookies
2012-11-03 origin/attributes_perf
... snipped ...

Show local branches only:

git config --global alias.latest "for-each-ref --sort=-committerdate refs/heads --format='%(committerdate:short) %(refname:short)'"

Source: http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit


  • Fc5f974ef4fd49e1bb6a48c669b496ef

    By using committerdate:relative you can get:

    2 days ago master
    11 days ago origin/master
    5 weeks ago tokens-feature
    5 weeks ago origin/tokens-feature
    5 weeks ago origin/login-feature
    5 weeks ago login-feature
    6 weeks ago service-feature
    6 weeks ago origin/service-feature
    6 weeks ago identity-feature
    6 weeks ago origin/identity-feature
    6 weeks ago origin/accounts-feature
    6 weeks ago accounts-feature
  • 68b3c1e2b3c882daab62c80db52a70ed

    Unfortunately for-each-ref's --format is crippled and you cannot use colors inside (in git log you can specify %C(yellow)string%C(reset)) :( anyone got around it maybe?

  • User-avatar

    That would be cool to have it colored. Anyone?

  • 20842946074d9b78d6004bb7cb18c603

    To get colors use --shell option, like this:

    git for-each-ref --sort=-committerdate --shell --format='echo -e "\e[0031m" %(refname:short) "\e[00m\e[0032m" %(committerdate:relative) "\e[00m\e[0034m" %(committername) "\e[00m"' refs/heads/ refs/remotes | bash
  • None

    After Installation, Showbox for ipad sets aside some an opportunity to stack the information identified with motion pictures and recordings. In the wake of stacking, it displays an enormous measure of information identified with motion pictures and TV appears.

    The client can now begin viewing their most loved motion pictures and recordings. Not simply watching, it additionally gives you a choice to Download them. A rundown of most loved films can be made and the client can deal with the motion pictures as per his inclinations and can watch at whatever point intrigued.

    Show Box as we all know is an extremely well known android application by method for which you can download or stream motion pictures and TV shows of your decision at whatever time you need, that too free. A considerable lot of you probably go over a comparative question, that showbox is an android application by what means would it be able to keep running on other brilliant gadgets without android stage? Well I have a proper response for that yes we can keep running on other shrewd gadgets also that too with no challenges. In this way, everything we need is an android emulator to run it on other keen gadgets, which are not android, and I would exceptionally prescribe Genymotion android emulator for running show box android application. Well Genymotion is an android application emulator, which depends on Virtual Box. One great element of it is that it doesn't oblige you to get virtual box introduced (it won't influence if introduced already) as it does a bundle establishment. Particular gadgets can likewise be imitated and it additionally permits you to introduce, run or test applications on it and this component of Genymotion makes it less demanding for you to utilize it all the time. Genymotion can work in various stages, for example, Windows, Mac OS X, Linux, and so on. showbox apk | http://showboxappandroid.com/showbox-for-iphone/ | http://showboxappandroid.com/showbox-for-ipad/ | Establishment ventures for Show Box on Mac OS X by means of Genymotion Emulator

    Showbox with Genymotion emulator shapes a complete bundle of stimulation to keep running on brilliant gadgets other than android. So today I'm demonstrating how to introduce and run Show box application on your Mac OS X by method for Genymotion android emulator. So keeping in mind the end goal to introduce Show Box on your Mac OS X you have to take after the directions step savvy that I have said beneath. The progressions for establishment and running show box on Apple Mac OS X are as per the following:

    At to start with, you have to download Genymotion Mac OS X(64 bits) and after that you have to make a record at Genymotion official site. showbox for ipad

    Presently you need to introduce the downloaded Genymotion emulator on your Mac

    At that point you have to download the virtualbox programming and introduce it just on your Mac OS

    When introduced, open showbox for iphone 6s and login with your subtle elements.

    At that point click on 'Add and you need to include a virtual gadget ( with a determination of 1080x1920), and afterward you have to double tap on the added gadget keeping in mind the end goal to run the virtual gadget. http://appshowbox.com/showbox-apk-latest-download/ | http://appshowbox.com/showbox-for-ios-iphone-ipad-ipod-download/ | ShowBox For iPhone Download permits you to watch your most loved movies and TV Shows for nothing on your Smartphone. Regardless of what smartphone you are you using, you can appreciate an untold number of free movies and recordings and TV Shows of your choice very easily.

  • None

    I throw a "objectname:short" in the format too so there's a handy sha if you need it

Add a comment