git sync tags with remote

git 同步遠程標籤

在 .git/config的 [remote "origin"] 下加了 fetch = +refs/tags/*:refs/tags/*

最後就變成

[remote "origin"]
    url = gitPath
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/tags/*:refs/tags/*

運行

git fetch --prune --tags

就同步到遠程的標籤了

參考

  1. In git, how do I sync my tags against a remote server?
原文地址:https://www.cnblogs.com/fsong/p/11336928.html