In git, how do I sync my tags against a remote server?

前端 未结 8 796
天涯浪人
天涯浪人 2020-12-02 08:37

Is there a way to keep my local git tags in lockstep with a remote\'s tags? That is -- not only get new tags when created (as usual, when fetch-ing/pull

8条回答
  •  悲&欢浪女
    2020-12-02 09:20

    git push --tags will push your local tags up to the server. By default, git fetch (the first half of git pull or git pull --rebase) will pull tags, but you can specify -t or --tags to pull all of them.

    I'm not sure how to prune remotely deleted tags, but the fetch should pull down any force-updated tags.

提交回复
热议问题