git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] tag: allow idempotent "git tag" without "--force"

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 11, 2025, 21:40 UTC
Message-ID
<xmqqcya6z9r7.fsf@gitster.g>
In-Reply-To
<dt5ruadvr7lmhsbypmb6yili5cookfx5btw4gzfeui7ehxxajv@ziael4udbbcy>
Justin Tobler <jltobler@gmail.com> writes:
> For example push the newly created tag:
>
>   git tag T O && git push --tags

The above is not quite a scalable workflow and is not recommendable, though. What if you are publishing to more than one place, and/or sometimes some of them are not reachable? You want to push out your tag not because you newly created it, but because you know some remotes may not have it for whatever reason. "I just created one" is a crude approximate for the latter. "Last time I created one, it somehow failed to push out" (so I have to try again) needs to be considered.

Having said that, ever since I invented "push --follow-tags", I rarely push tags out just for the sake of pushing them out. Only when the real contents that matter are pushed out, tags that point at them would follow.

> To me atleast, the feedback of knowing whether tag was created seems a bit more
> interesting. I also don't feel super strongly though.

I do not fell strongly one way or anothre, either. Discarding the topic is easier than keeping it for me, so let me mark it for trash bin.

Thanks.
Previous: Justin Tobler
Message 14 of 14 in “Suggestion: error "tag ... already exists" should distinguish between tagging different or same commit:”
  1. M HickfordJun 9, 2025
  2. Junio C HamanoJun 9, 2025
  3. Hilco WijbengaJun 9, 2025
  4. Andreas SchwabJun 9, 2025
  5. Junio C HamanoJun 9, 2025
  6. Hilco WijbengaJun 9, 2025
  7. M HickfordJun 10, 2025
  8. Junio C HamanoJun 10, 2025
  9. Junio C HamanoJul 7, 2025
  10. rsbecker@nexbridge.comJul 7, 2025
  11. Junio C HamanoJul 11, 2025
  12. tag: allow idempotent "git tag" without "--force"Junio C Hamano, Jul 11, 2025
  13. Justin ToblerJul 11, 2025
  14. Junio C HamanoJul 11, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.