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?
posted @ 2018-12-13 21:57  五毛钱的饼  阅读(431)  评论(0)    收藏  举报