git push / clone到新服务器 [英] git push/clone to new server
问题描述
我只是在学习git,有些东西我不能解决。在Mac上本地创建并使用git存储库之后,我可以将副本推送到别处的另一台服务器上吗?我在防火墙后面,所以不幸的是我不能在另一台机器上运行 git clone
。
git push
name 分支 $ b
示例:
git remote add origin git@github.com:foo / bar .git
git push origin master
查看 git的文档推送
- 您可以将遥控器设置为给定分支的默认遥控器;如果你不这样做,名字 origin
是特殊的。只需 git push
就可以完成和 git push origin
thisbranch 你在)。
Im just learning git and there is something I cant work out. After creating and using a git repository locally on my Mac, can I push a copy to another server somewhere else? I am behind a firewall so unfortunately I can't run git clone
from the other machine.
git remote add
name urlgit push
name branch
Example:
git remote add origin git@github.com:foo/bar.git
git push origin master
See the docs for git push
-- you can set a remote as the default remote for a given branch; if you don't, the name origin
is special. Just git push
alone will do the same as git push origin
thisbranch (for whatever branch you're on).
这篇关于git push / clone到新服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!