Git development
 help / color / mirror / Atom feed
* checkout: clarify "up to date with origin/" uses local remote-tracking ref
@ 2026-04-07 13:10 Jesko Schwarzer
  2026-04-07 15:23 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Jesko Schwarzer @ 2026-04-07 13:10 UTC (permalink / raw)
  To: git; +Cc: git.vger.kernel.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-08 18:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 13:10 checkout: clarify "up to date with origin/" uses local remote-tracking ref Jesko Schwarzer
2026-04-07 15:23 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox