AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Git fetch all tags8/15/2023 ![]() ![]() 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 Request that all tags be fetched from the remote in addition to whatever else is being fetched. See " Does “ git fetch -tags” include “ git fetch”?". 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). Using this option alone does not subject tags to pruning, even if -prune is used (though tags may be pruned anyway if they are also the destination of an explicit refspec see -prune ). When I issue git pull on branch master, all remote heads are fetched into remotes/upstream, then remotes/upstream/master is merged into master. The former will fetch all tags, but won't update the branch heads. Fetch all tags from the remote (i.e., fetch remote tags refs/tags/ into local tags with the same name), in addition to whatever else would otherwise be fetched. 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”?".
0 Comments
Read More
Leave a Reply. |