zl程序教程

您现在的位置是:首页 >  工具

当前栏目

git sync tags with remote

Git with Remote Sync Tags
2023-09-11 14:20:10 时间

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?