From 9d1a620282668771cd34e2d0ad4be720e9bb6b16 Mon Sep 17 00:00:00 2001 From: monteiz Date: Wed, 2 Jul 2025 08:36:35 +0200 Subject: [PATCH] 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 Signed-off-by: monteiz --- Documentation/gittutorial.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/gittutorial.adoc b/Documentation/gittutorial.adoc index f89ad30cf652b4..f3563fdc8f5adb 100644 --- a/Documentation/gittutorial.adoc +++ b/Documentation/gittutorial.adoc @@ -341,6 +341,11 @@ Alice already knows everything that leads to her current state (`HEAD`), and reviews what Bob has in his state (`FETCH_HEAD`) that she has not seen with this command. +[NOTE] +==== +`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. +==== + If Alice wants to visualize what Bob did since their histories forked she can issue the following command: