gpt4 book ai didi

Git push -f 与 +

转载 作者:IT王子 更新时间:2023-10-29 00:43:31 26 4
gpt4 key购买 nike

做和做有什么区别:

 git push -f origin my-branch:my-branch

 git push origin +my-branch:my-branch

?

最佳答案

这是实现同一目标的两种语法。

除了 git push --force 可以在你指定任何 refspec 时使用(意味着你想将当前分支推送到远程匹配名称分支).
它比:

git push origin +yourBranch

,如 Git Community Book 中所述.

请参阅“Why “git push helloworld +master:master” instead of just “git push helloworld”?”以了解说明。

关于Git push -f 与 +,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3741136/

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