gpt4 book ai didi

git - "git push"和 "git push --tags"在同一命令中?

转载 作者:IT王子 更新时间:2023-10-29 01:15:08 25 4
gpt4 key购买 nike

我通常运行:

git push
git tag v4.7
git push --tags

第一个和第三个操作都连接到服务器,浪费时间。
我想通过只推一次来让它更快。什么命令可以实现这一点?
它在 bash 中 script ,并且需要在任何分支中都能正常运行,而不仅仅是 master

阅读手册,我认为 git push all 不是解决方案:

--all: Instead of naming each ref to push, specifies that all refs under refs/heads/ be pushed.

--tags: All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line.

最佳答案

最接近的选项可能是:

git push --follow-tags

Push all the refs that would be pushed without this option, and also push annotated tags in refs/tags that are missing from the remote but are pointing at committish that are reachable from the refs being pushed.

关于git - "git push"和 "git push --tags"在同一命令中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19404436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com