I\'m fairly new to Git, and still getting the hang of it. I just recently started working with branches and am running into some questions.
I have two development system
As far as I know, HEAD
is not a branch, but rather a pointer to a node of the history tree (i.e. a commit). The files which are residing in you particular working copy have the state described by HEAD
.
Usually HEAD
points to the most recent commit in a branch, so you have the most recent files in the working copy. Using git reset HEAD^
you can shift the pointer to previous commit (i.e. undoing the last commit in your local copy).
Now, every git repo has a HEAD
, check this with git show HEAD
. Accordingly, origin/HEAD
is HEAD
of your origin
remote.
Now, I've found a good question describing HEAD
: What is HEAD in Git?