如何从本地创建远程 Git 存储库? [英] How to create a remote Git repository from a local one?
本文介绍了如何从本地创建远程 Git 存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个本地 Git 存储库.我想让它在支持 ssh 的远程服务器上可用.我该怎么做?
I have a local Git repository. I would like to make it available on a remote, ssh-enabled, server. How do I do this?
推荐答案
我认为你在远程端做了一个裸仓库,git init --bare
,添加远程端作为 push/为您的本地存储库拉跟踪器(git remote add origin URL
),然后在本地您只需说 git push origin master
.现在任何其他存储库都可以从远程存储库pull
.
I think you make a bare repository on the remote side, git init --bare
, add the remote side as the push/pull tracker for your local repository (git remote add origin URL
), and then locally you just say git push origin master
. Now any other repository can pull
from the remote repository.
这篇关于如何从本地创建远程 Git 存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文