将本地存储库推送到服务器 [英] Pushing local repository to server
本文介绍了将本地存储库推送到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以问题是:
是否有任何方式推送整个本地初始化回购?
<$ p $ p>
git remote add origin< server repo url>
现在您可以执行此操作:
git push --all
将所有分支推送到原点,默认的远程。 (如果您将其命名为其他内容,则必须将其指定为参数。)
Up till now, I worked on a local repository ( locally initialized, not cloned ). Because I am working on more than one workstation, I decided to "go online" and want to push my repo to server. Also, I want to push all branches.
So question is: Is there any way of pushing whole locally initialized repo ?
解决方案
To make things easier, start by creating a remote if you haven't already:
git remote add origin <server repo url>
Now you can do this:
git push --all
to push all branches to origin, the default remote. (If you name it something else, you'd have to specify it as an argument.)
这篇关于将本地存储库推送到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文