# gitk: visually indicate whether a tag exists on a remote

3 messages from 2025-07-09 to 2025-07-09. Participants: Adi Shavit, Chris Torek, Marc Branchaud.
Thread: https://gitlist.dev/t/63768

## Adi Shavit, 2025-07-09 08:36

Subject: gitk: visually indicate whether a tag exists on a remote
Message-ID: <CAEWUs4gEsASB3Fog2Zc5tEfACPURjHPqaS6e2XNWj0i50O-e5Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAEWUs4gEsASB3Fog2Zc5tEfACPURjHPqaS6e2XNWj0i50O-e5Q%40mail.gmail.com
In-Reply-To: <CAEWUs4iWwrOw4sXT9PhdccZyWtcvTgQfHDbeavTk-2kOdjUMdA@mail.gmail.com>

```
Hi all,

*Problem*

When browsing history in **gitk**, I often need to know whether a tag I
see on a commit was:

  * fetched from a remote (and therefore shared with collaborators), or
  * created only in my local repository and not yet pushed.

For branches this distinction is obvious because gitk lists local and
remote-tracking branch heads separately.  Tags, however, are shown in a
single list, so a locally added tag and one fetched from ­–‐say–‐
`origin` look identical.  This can mislead users into thinking a tag is
already published when in fact it is not.

*Proposed enhancement*

Add an opt-in visual cue that a tag also exists on at least one remote.
Possible UI sketches (open for discussion):

  1. **Suffix** the tag label with the remote name in parentheses, e.g.
     `v1.2.3 (origin)`.
  2. **Colour** or style the tag differently (similar to how remote
     branches are blue vs. local green).
  3. **Tool-tip**: on hover, list the remotes that advertise the tag.

*Why this belongs in gitk*

gitk’s strength is that it gives an at-a-glance view of history.  Making
tags’ publication state equally transparent would save users a trip to
the command line and reduce accidental “forgot to push the tag” issues.

Thanks for considering, and for maintaining gitk!

Best regards,
Adi Shavit

```

## Chris Torek, 2025-07-09 08:45

Subject: Re: gitk: visually indicate whether a tag exists on a remote
Message-ID: <CAPx1Gvd+XwN1YbbTiVCM-6rSr=9o5mB+T-=c8x5gpLkUp_hZ8A@mail.gmail.com>
URL: https://gitlist.dev/e/CAPx1Gvd%2BXwN1YbbTiVCM-6rSr%3D9o5mB%2BT-%3Dc8x5gpLkUp_hZ8A%40mail.gmail.com
In-Reply-To: <CAEWUs4gEsASB3Fog2Zc5tEfACPURjHPqaS6e2XNWj0i50O-e5Q@mail.gmail.com>

```
On Wed, Jul 9, 2025 at 1:37 AM Adi Shavit <adishavit@gmail.com> wrote:
> When browsing history in **gitk**, I often need to know whether a tag I
> see on a commit was:
>
>   * fetched from a remote (and therefore shared with collaborators), or
>   * created only in my local repository and not yet pushed.

This information is not (currently) available in Git.

> For branches this distinction is obvious because gitk lists local and
> remote-tracking branch heads separately.  Tags, however, are shown in a
> single list, so a locally added tag and one fetched from ­–‐say–‐
> `origin` look identical.

They not only look identical, they *are* identical*.

To make these show up separately, you would have to do at least one of
the following:

 * collect information from the remote in gitk itself (run `git ls-remote`); or
 * collect information from the remote during `git fetch`

The latter would be possible by adding the concept of "remote tags" to
Git, but this is a pretty big change (not technically difficult but
probably controversial).

Chris

```

## Marc Branchaud, 2025-07-09 16:09

Subject: Re: gitk: visually indicate whether a tag exists on a remote
Message-ID: <5733c746-96dd-4375-8a68-5b42934ded45@xiplink.com>
URL: https://gitlist.dev/e/5733c746-96dd-4375-8a68-5b42934ded45%40xiplink.com
In-Reply-To: <CAPx1Gvd+XwN1YbbTiVCM-6rSr=9o5mB+T-=c8x5gpLkUp_hZ8A@mail.gmail.com>

```

On 2025-07-09 04:45, Chris Torek wrote:
> 
>   * collect information from the remote during `git fetch`
> 
> The latter would be possible by adding the concept of "remote tags" to
> Git, but this is a pretty big change (not technically difficult but
> probably controversial).

This was discussed long ago.  See:

https://lore.kernel.org/git/201011040149.47968.johan@herland.net/

and

https://lore.kernel.org/git/CA+P7+xpj+8DZ=K0pna299Mu3nsQ4+JV_JUK=WFzzAFnJN+Bkbg@mail.gmail.com/

		M.


```
