From: Jesko Schwarzer <jesko@schwarzers.de>
To: git@vger.kernel.org
Cc: git.vger.kernel.org@schwarzers.de
Subject: checkout: clarify "up to date with origin/" uses local remote-tracking ref
Date: Tue, 7 Apr 2026 15:10:25 +0200 [thread overview]
Message-ID: <956b1bec-99ec-4d28-8229-804eb14e6d3a@schwarzers.de> (raw)
Hello together,
this is my first post. I am using git*version 2.43.0* on Ubuntu 24.04LTS
and have an UX proposal:
When I run git checkout master on a branch that tracks origin/master,
Git often prints:
Your branch is up to date with 'origin/master'.
I naively read this as "my branch matches the current state of the
remote repository." In practice, origin/master here is only the local
remote-tracking ref; it is not refreshed unless I run fetch/pull. If the
remote has moved on since my last fetch, the message can still be "up to
date" while git pull immediately brings new commits (fast-forwarding
origin/master and then master).
So the comparison is correct relative to the cached
refs/remotes/origin/master, but the wording is easy to *misread *as "I
just verified against the server."
Would the project consider one of the following?
1. *Clearer messaging*, e.g. indicating that the comparison is
against the last-known origin/<branch> (or similar wording that does not
imply a live remote check).
2. *Optional context* when available (e.g. from reflog or last
fetch time), so users know how stale the origin/* ref might be — if that
is technically and policy-wise acceptable.
I understand Git deliberately avoids implicit network access on
checkout; the issue is only that the status text does not make the
"local remote-tracking ref" semantics obvious to everyone.
Thanks for maintaining Git,
mit freundlichen Grüßen/Best regards
/Jesko
next reply other threads:[~2026-04-07 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 13:10 Jesko Schwarzer [this message]
2026-04-07 15:23 ` checkout: clarify "up to date with origin/" uses local remote-tracking ref Junio C Hamano
2026-04-07 16:13 ` Ben Knoble
2026-04-07 16:23 ` Junio C Hamano
2026-04-07 16:27 ` Junio C Hamano
2026-04-08 18:14 ` D. Ben Knoble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=956b1bec-99ec-4d28-8229-804eb14e6d3a@schwarzers.de \
--to=jesko@schwarzers.de \
--cc=git.vger.kernel.org@schwarzers.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox