Skip to content

Instantly share code, notes, and snippets.

@johnnyutahh
Created May 1, 2015 15:22
Show Gist options
  • Save johnnyutahh/2f4db5c755bc032b106b to your computer and use it in GitHub Desktop.
Save johnnyutahh/2f4db5c755bc032b106b to your computer and use it in GitHub Desktop.
Determine the current checked-out Git branch on Mac OS X, 10.9.5
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.5
BuildVersion: 13F1077
$ git checkout 56acc6b75c15f40f2766ca89751ba32648059352
Note: checking out '56acc6b75c15f40f2766ca89751ba32648059352'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 56acc6b... added minor code comment
$ git rev-parse --abbrev-ref HEAD
HEAD
$ git --version
git version 2.1.3
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment