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 @   五毛钱的饼  阅读(370)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示