git detaching head on latest commit of particular branch

I was following the answer of this SO question: http://stackoverflow.com/questions/1464642/git-merge-squash-repeatedly

It worked perfectly on my 11.10 machines (git 1.7.4.1), but would not work on a 10.04 machines (git 1.7.0.4)

The problem was this command: git checkout development@{0}
My git could not understand the curly braces – I guess it must be a git version problem, but I’ve got the most updated version of git for Ubuntu 10.04 from the Ubuntu repositories and I didn’t want to upgrade to see.

(Another post mentions use of the curly braces, like this: {now} – http://sitaramc.github.com/concepts/detached-head.html)

Anyway, solution: git checkout `git rev-parse development`

Leave a Reply

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