I have created a Git repository on my Desktop machine (Windows 7) with:
git init
git add
git commit -m \"added my files\"
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