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

Re: Bug!?: Refspec '+' should be same as '--force' but is not

From
Ben Knoble <ben.knoble@gmail.com>
Date
Sep 15, 2026, 16:41 UTC
Message-ID
<DF50C11C-44E1-4BEC-A446-8C27F165478F@gmail.com>
In-Reply-To
<1bcb043e-e744-4e01-8569-4da5669d25fc@carneios.de>
Show 13 quoted lines
> Le 15 sept. 2026 à 11:33, André Kießling <akiessling@carneios.de> a écrit :
> 
> Hi there, think I found a bug...
> 
> In https://git-scm.com/docs/git-push I find:
> > The + is optional and does the same thing as --force.
> 
> The fetch documentation refers to push for the details of <refspec> so I assume, the statement also holds for fetch refspecs.
> However, this is not true:
> When I run `git fetch origin --tags --force` it will force update tags that changed on remote (as expected) but will NOT delete local tags.
> When I run `git fetch origin` with config set to `remote.origin.fetch = +refs/tags/*:refs/tags/*` it will delete my local tags as if prune was set.
> 
> I'm using Git 2.54.0.windows.1

I think this behavior is described in git-fetch(1) in the PRUNING section. It’s a bit opaque to me :) Still, you might take a look there and see what you find.

Previous: André KießlingNext: Junio C Hamano
Message 2 of 3 in “Bug!?: Refspec '+' should be same as '--force' but is not”
  1. André KießlingSep 15, 2026
  2. Ben KnobleSep 15, 2026
  3. Junio C HamanoSep 15, 2026

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.