summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-18 18:46:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-18 18:46:29 (GMT)
commitcd797c7e6b5e5818e08e22c7e244000a07be151c (patch)
tree58acce08582aeb168f070c0e6fa32a42eab5841f /Documentation
parent193e28f050fff85600212f8f4789681efd418a45 (diff)
parent1d77d249f9b0605ed21ca751c5dfb8550efcdfa3 (diff)
downloadgit-cd797c7e6b5e5818e08e22c7e244000a07be151c.zip
git-cd797c7e6b5e5818e08e22c7e244000a07be151c.tar.gz
git-cd797c7e6b5e5818e08e22c7e244000a07be151c.tar.bz2
Merge branch 'jc/detached-head-doc'
* jc/detached-head-doc: glossary: extend "detached HEAD" description
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/glossary-content.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index eb7ba84..2478a39 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -100,9 +100,22 @@ to point at the new commit.
[[def_detached_HEAD]]detached HEAD::
Normally the <<def_HEAD,HEAD>> stores the name of a
- <<def_branch,branch>>. However, Git also allows you to <<def_checkout,check out>>
- an arbitrary <<def_commit,commit>> that isn't necessarily the tip of any
- particular branch. In this case HEAD is said to be "detached".
+ <<def_branch,branch>>, and commands that operate on the
+ history HEAD represents operate on the history leading to the
+ tip of the branch the HEAD points at. However, Git also
+ allows you to <<def_checkout,check out>> an arbitrary
+ <<def_commit,commit>> that isn't necessarily the tip of any
+ particular branch. The HEAD in such a state is called
+ "detached".
++
+Note that commands that operate on the history of the current branch
+(e.g. `git commit` to build a new history on top of it) still work
+while the HEAD is detached. They update the HEAD to point at the tip
+of the updated history without affecting any branch. Commands that
+update or inquire information _about_ the current branch (e.g. `git
+branch --set-upstream-to` that sets what remote tracking branch the
+current branch integrates with) obviously do not work, as there is no
+(real) current branch to ask about in this state.
[[def_dircache]]dircache::
You are *waaaaay* behind. See <<def_index,index>>.