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

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

    You need to create a directory on a remote server. Then use "git init" command to set it as a repository. This should be done for each new project you have (each new folder)

    Assuming you have already setup and used git using ssh keys, I wrote a small Python script, which when executed from a working directory will set up a remote and initialize the directory as a git repo. Of course, you will have to edit script (only once) to tell it server and Root path for all repositories.

    Check here - https://github.com/skbobade/ocgi

提交回复
热议问题