Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I force fetching of tags if I have the --no-tags option set

Whenever I run git fetch it fetches all the tags from origin. In a project with lots of tags, this can get quite bothersome. So I ran git config remote.origin.tagopt --no-tags so fetching will no-longer fetch tags.

However, there are some times when I do want to fetch tags, or a single tag. Does anyone know how to do this? (besides removing that configuration, and running git fetch --no-tags every time)

Thanks!

like image 855
Douglas Meyer Avatar asked Apr 15 '10 16:04

Douglas Meyer


People also ask

How do I fetch all tags?

To fetch tags from your remote repository, use “git fetch” with the “–all” and the “–tags” options. Let's say for example that you have a tag named “v1. 0” that you want to check out in a branch named “release”. Using this command, you have successfully checked out the “v1.

Does git fetch get all tags?

git fetch --tags fetches all tags, all commits necessary for them. It will not update branch heads, even if they are reachable from the tags which were fetched.

What is the git fetch command?

Git fetch summary In review, git fetch is a primary command used to download contents from a remote repository. git fetch is used in conjunction with git remote , git branch , git checkout , and git reset to update a local repository to the state of a remote.


1 Answers

To fetch a single tag, you can use git fetch <remote-name> tag <tag-name>.

like image 113
robinst Avatar answered Nov 15 '22 07:11

robinst