How to push a new branch non-existing on the remote server without --set-upstream?

℡╲_俬逩灬. 提交于 2019-11-30 23:43:41
VonC

The right command is:

git push -u origin master

Then the next git push will be a simple: git push.

See "Why do I need to explicitly push a new branch?"

Since Git 1.8, --set-upstream is called --set-upstream-to

You can setup a remote tracking branch in advance with:

git branch -u origin/master master 

(Then your first git push would have been a simple git push)

That is how i push to gerrit instance without adding remote

git push http://localhost:8080/scm *:*
fatal: remote error: Git repository not found

But the project must exist already

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!