How do I add a remote Git repository to an Ubuntu Server?

后端 未结 7 652
孤街浪徒
孤街浪徒 2021-01-30 03:52

I have created a Git repository on my Desktop machine (Windows 7) with:

git init
git add 
git commit -m \"added my files\"

7条回答
  •  闹比i
    闹比i (楼主)
    2021-01-30 04:38

    I normally create a bare repository locally and then scp that repository to the server when I'm setting up a remote repository.

    For example,

    cd c:\gits
    git clone --bare c:\path\to\local\repository\some_project
    

    which creates some_project.git.

    Then,

    scp -r some_project.git login@some.server:/path/to/remote/gits/.
    

    enter your password or maybe you already have public/private key access working.

提交回复
热议问题