Skip to content

Commit bc2d807

Browse files
committed
docs: clarify FETCH_HEAD overwrite behavior in gittutorial
Adds a note explaining that FETCH_HEAD is overwritten on every fetch, to avoid misunderstandings when fetching from multiple sources. Signed-off-by: Luca Fagioli <monteiz@gmail.com>
1 parent 83014dc commit bc2d807

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/gittutorial.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ Alice already knows everything that leads to her current state (`HEAD`),
341341
and reviews what Bob has in his state (`FETCH_HEAD`) that she has not
342342
seen with this command.
343343

344+
[NOTE]
345+
====
346+
`FETCH_HEAD` is overwritten each time `git fetch` is run. If Alice fetches from another repository or branch afterward, `FETCH_HEAD` will refer to that most recent fetch result — not to Bob's branch anymore.
347+
====
348+
344349
If Alice wants to visualize what Bob did since their histories forked
345350
she can issue the following command:
346351

0 commit comments

Comments
 (0)