Re: user manual question
- From
Markus Heidelberg <markus.heidelberg@web.de>
- Date
- Dec 29, 2008, 17:20 UTC
- Message-ID
- <200812291820.58642.markus.heidelberg@web.de>
- In-Reply-To
- <gjauel$94s$4@ger.gmane.org>
Zorba, 29.12.2008:
> so a detached HEAD is just a HEAD that is not sitting on a tip ?
You can also get a detached HEAD with "git checkout origin/master", although your HEAD points to a tip. But it's a remote tip and since you can't work on remote branches, you now are on a detached HEAD (no branch).
Show 5 quoted lines
> i.e. if I do $ git reset --hard HEAD^ > > ...pointing HEAD to the previous committ > > this is a detached HEAD
No, this isn't. "git reset <commit>" modifies your current head (local branch), now HEAD still points to the tip, but the tip is one commit older. A detached HEAD you can get with "git checkout HEAD^".