How to create a remote Git repository from a local one?

前端 未结 8 1774
不知归路
不知归路 2020-12-02 03:29

I have a local Git repository. I would like to make it available on a remote, ssh-enabled, server. How do I do this?

8条回答
  •  悲&欢浪女
    2020-12-02 04:29

    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.

提交回复
热议问题