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

后端 未结 7 651
孤街浪徒
孤街浪徒 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条回答
  • 2021-01-30 04:47

    Have a look at the handy script git-create.bash by Eike Kettner . Give it your preferred remote address (jonas@192.168.1.10:code/myproject.git), and it will automatically SSH in to create the directory and initialize an empty --bare repository for you. All you need to do is add the git remote and git push.

    git-create.bash: Create new empty remote git repository via ssh

    Usage:

    git-create.bash 'jonas@192.168.1.10:code/myproject.git'
    git remote add origin 'jonas@192.168.1.10:code/myproject.git'
    git push -u origin master
    
    0 讨论(0)
提交回复
热议问题