From: "Manuel Quiñones" <manuel.por.aca@gmail.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: bram@van-oosterhout.org, Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: Usability issue: "Your branch is up to date"
Date: Tue, 4 Feb 2025 09:53:13 -0300 [thread overview]
Message-ID: <CAPpV+ObaMU+WQM5gVCcY3ypPaobMtbu3dZQByOKPXyiscUBcuA@mail.gmail.com> (raw)
In-Reply-To: <CALnO6CB2TjwRWr0=c2nWY5DnwLeqXiaA5fCiEeF85zivmLggjA@mail.gmail.com>
El lun, 3 feb 2025 a la(s) 11:08 p.m., D. Ben Knoble
(ben.knoble@gmail.com) escribió:
>
> On Mon, Feb 3, 2025 at 7:28 PM Bram van Oosterhout
> <adriaanbram0712@gmail.com> wrote:
> >
> > Ahhhh, this thread explains my confusion when, even though git locally
> > tells me my branch is "up to date", a fetch demonstrates the branch is
> > not up to date.
> >
> > Which begs the question: Why does git say: "Your branch is up to date
> > ..." if at best it can say: "Your
> > branch MIGHT BE up to date with ..."?
>
>
> Well, the branch _is_ up to date with your remote-tracking branch [1]
> origin/main; that doesn't mean the tracking branch is up-to-date with
> the repository origin's branch main!
>
> I find it helpful to break the notion for newcomers early on that
> origin/main somehow is "equal to" the repository named by origin's
> main branch. Git (mostly) only communicates with remote repos when you
> fetch, push, or, pull—in other words (and this bit may be more for
> Manuel), try to reinforce that things Git knows locally are only local
> and not inherently tied to other repositories. Learning this
> distributed lesson proves hard in my experience but explains a lot
> about the reality of how Git operates.
Thanks for the advice Ben. Very good point. I will introduce the
difference between the origin's main branch and the remote-tracking
branch early in lessons. This is a core part of how Git works.
Still I suggest improving the usability for new generations with a
timestamp of the remote-tracking branch last update. Hopefully in the
future it will be possible!
--
.. manuq ..
next prev parent reply other threads:[~2025-02-04 12:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 16:45 Usability issue: "Your branch is up to date" Manuel Quiñones
2025-02-03 16:56 ` Junio C Hamano
2025-02-04 0:10 ` Junio C Hamano
2025-02-04 0:28 ` Bram van Oosterhout
[not found] ` <CAPx1GveyP4+yn5NMgvO3JpbOwPRT5=tb9YBx7U1Ufvae7gFnHQ@mail.gmail.com>
[not found] ` <CAMoUM6LstYx3PJcx-Sz3Dfs-1BxF1uP373MO8+eknbO7j-S01Q@mail.gmail.com>
2025-02-04 0:51 ` Fwd: " Bram van Oosterhout
2025-02-04 2:08 ` D. Ben Knoble
2025-02-04 12:53 ` Manuel Quiñones [this message]
2025-02-05 3:55 ` Bram van Oosterhout
2025-02-04 12:38 ` Manuel Quiñones
2025-02-04 17:43 ` Junio C Hamano
2025-02-05 6:54 ` Patrick Steinhardt
2025-02-05 18:40 ` Junio C Hamano
2025-02-06 9:53 ` Patrick Steinhardt
2025-02-07 8:20 ` Karthik Nayak
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=CAPpV+ObaMU+WQM5gVCcY3ypPaobMtbu3dZQByOKPXyiscUBcuA@mail.gmail.com \
--to=manuel.por.aca@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=bram@van-oosterhout.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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;
as well as URLs for NNTP newsgroup(s).