Git once again honors its name #2

Why is it that:

$ git rev-parse --symbolic --branches

gives me a perfectly parseable output when the more logical

$ git branch -l

gives me an extra “remark” ala:

* (detached from v1.0.0)?

The objective was to find out whether there’s a branch called (in this particular case) v1.0.0. Guess what, since I was already on the checked out tag of that name, the obvious git branch -l|grep -q 'v1.0.0' didn’t quite cut it due to aforementioned “remark”. Brilliant.

IMNSHO: Git is like Perl and Mercurial is like Python. One has x many obscure ways to accomplish a task, the other has one clear cut way. One is art the other engineering1. And if you are an admirer of this particular kind of art that’s perfectly fine, too. Not going to proselytize anybody. It’s just that I want my tools to help me do my job, not to hinder me.

// Oliver

  1. reminded me of the respective paragraph from “Learning Python” about the background of the language founders of Perl and Python respectively []
This entry was posted in EN, Programming, VCS. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *