git push origin mybranch
会引起任何变化吗?
答案 0 :(得分:0)
很简单,它会将您的更改推送到已设置为名为origin
的远程的任何存储库。
您可以使用
显示您拥有的遥控器以及它们指向的位置git remote -v
当您自己运行git push
时,它会推送到为您当前分支配置的默认远程。您可以使用the answers to this question找出它是什么。例如,如果:
git remote show upstream
包括以下行:
mybranch pushes to mybranch
然后git push
相当于git push upstream mybranch
。
更常见的是,默认遥控器无论如何都会origin
,因此git push
和git push origin mybranch
会做同样的事情。