sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.22k stars 977 forks source link

Use --no-prune-tags in git fetch command #682

Open jkseppan opened 3 months ago

jkseppan commented 3 months ago

Documentation for --prune-tags says:

Before fetching, remove any local tags that no longer exist on
the remote if --prune is enabled.  This option should be used
more carefully, unlike --prune it will remove any local references
(local tags) that have been created. This option is a shorthand
for providing the explicit tag refspec along with --prune, see
the discussion about that in its documentation.

I had fetch.prunetags set in my .gitconfig because normally I want to delete outdated tags. But I hadn't realized that this causes my newly-created local tags to be deleted. It seems harmless to use --no-prune-tags in the git fetch command.

The option was added in Git 2.17.0. Ubuntu 18.04 has 2.17.1, Debian buster has 2.20.1, RHEL 8 has 2.18.something.