[英]Git push to corresponding branch without having to write the branch name
I cloned a git repo and do my local changes.我克隆了一个 git repo 并进行了本地更改。 I add and commit and now I want to push to the remote repo.
我添加并提交,现在我想推送到远程仓库。 Currently I use:
目前我使用:
git push origin [branch]
But I remember to have been told, that git push
can be enough.但我记得有人告诉我,
git push
就足够了。 Still I cannot figure out how to do that.我仍然无法弄清楚如何做到这一点。
Any help is greatly appreciated!任何帮助是极大的赞赏!
Please refer to this solution: Default behavior of "git push" without a branch specified请参考这个解决方案: 没有指定分支的“git push”的默认行为
The accepted answer gives a clear overview.接受的答案给出了清晰的概述。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.