Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 7, 2024

  1. Use --no-prune-tags in git fetch command

    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.
    jkseppan committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    1b7061d View commit details
    Browse the repository at this point in the history