Michael <keybou...@gmail.com> writes:
>> those two sentences say the same thing.  HEAD *is* "the branch tip pointer",
>> unless it's detached.
> Alright, maybe this is my first point of confusion.
> I thought "HEAD" is where you are at -- which of those letters you are
> pointing to.
> And, it may also be where a branch tip is pointing.
> If I make a commit while on a branch, then HEAD -- which letter I'm at
> -- updates, and the branch tip pointer also updates.
> If I'm detached, then which letter I'm at updates, but the branch tips do not.
> Based on that, I thought that "git reset --soft" would change which
> letter I'm pointing at, and leave the branch pointers unchanged.

Your terminology is hard to follow here.

There are two situations:

1) Normally, HEAD is (effectively) a symlink to one of the branch names,
which in turn points to a commit.  If you git-commit, the index contents
are used to make a new commit, that commit's parent is the commit
pointed by the branch name that is the target of HEAD, and that branch
name is updated to the new commit (and so HEAD also points to that
commit, in two steps).

2) A detached HEAD is a pointer to a commit.  Creating a new commit does
a similar this as in (1), but only HEAD is updated.

"git reset --soft" changes what branch name HEAD links to.

But here, to get to the bottom of the problem, please construct a
reproducible example of it, using only command-line operations.  Then we
can tell exactly what you did (with no possibility that you make a
mistake in describing it), and reproduce it ourselves.  IIRC, "git log
--graph" can show the history of may branches.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to