First, ssh onto the remote machine (for this example, call it myhost) and then:
- cd to location you want the repo (in my case, on Mac OS X this is /Volumes/SRV-EXT2)
- mkdir mynewrepo
- cd mynewrepo
- git init --bare
- cd into source dir
- git init
- git add your files (I like to add them individually, "git add ," may pick up unwanted files)
- git commit
- git remote add origin gituser@myhost:/Volumes/SRV-EXT2/mynewrepo
- git push origin master