Setting it to -tags will fetch every tag from remote, even if they are not reachable from remote branch heads. So you can try the remote.tagOpt config option: git config (-global) remote.tagOpt -tags To fetch tags from your remote repository, use git fetch with the all. Note that you will have to make sure that you have the latest tag list from your remote repository. Request that all tags be fetched from the remote in addition to whatever else is being fetched. To checkout, a Git tag, use the git checkout command and specify the tag name as well as the branch to be checked out. It will return a list of tags marked with v1.1. See " Does “ git fetch -tags” include “ git fetch”?". You can list all existing tags git tag or you could filter the list with git tag -l v1.1., where acts as a wildcard. Note that starting git 1.9/2.0 (Q1 2014), git fetch -tags will fetch everything (like git fetch), plus the tags. So if your tags are reacheable from the branches you are fetching, you don't have to include -tags by default.Ĭonsidering the large history of some repos (including the linux one), always wanting to fetch all tags might lead to tag list cluttering (a list of tag pollutted by hundreds of not-needed tags). The former will fetch all tags, but won't update the branch heads. The latter will update branch heads, and will actually fetch tags reachable from those updated branches. Fetching tags has a different effect than fetching commits ( git fetch), as explained in " Does “git fetch -tags” include “git fetch”?". The fetch command in Git downloads commits, files, and other information from a remote repository to your local repository, safely.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |