paperlined.org
apps > git
document updated 13 years ago, on Aug 18, 2011

Various special names that pop up when specifying the version and/or branch to checkout, diff, etc

special version selectors

HEAD

FETCH_HEAD — updated at the last git fetch

ORIG_HEADread here

version selector modifiers

HEAD@{1} — the next-to-last value of HEAD

HEAD^ — the parent of HEAD

HEAD^^ — the grandparent of HEAD

HEAD~4 — the great-great grandparent of HEAD

HEAD^1 — when a commit has multiple parents (ie. a merge), this is the first parent

HEAD^2 — when a commit has multiple parents (ie. a merge), this is the second parent

remote repository names

origin — it's automatically created if you clone a remote repository (see the output of git remote show just after cloning)

version/branch notation

git log HEAD..FETCH_HEAD
gitk HEAD..FETCH_HEAD