git fetch --tags

Downloads all remote tags without merging any branch changes.

This command updates your local repository’s tag list by downloading all tags from the remote without applying any branch updates.

The git fetch part connects to the configured remote (defaulting to origin) and retrieves new data, while the --tags flag tells Git to grab all references under refs/tags/* so that any tags created or updated on the server are recorded locally without touching your branches or working directory.

You can target a specific remote (e.g. git fetch upstream --tags), fetch tags from every remote with git fetch --all --tags, or force-update your local tags via git fetch --tags --force; related commands include git pull --tags to fetch and merge tags alongside branch updates and git ls-remote --tags to view remote tags without downloading them.

Related commands

Welcome to GitExamples!

Sign in to enable bookmarking, reminders, progress-tracking and more...