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

前端 未结 8 1740
不知归路
不知归路 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:12

    In current code folder.

    git remote add origin http://yourdomain-of-git.com/project.git
    git push --set-upstream origin master
    

    Then review by

    git remote --v
    

提交回复
热议问题