I cannot find any of the files on my remote repo.
You shouldn't have created a 'standard' git repo on the remote host, as Brian Campbell noted. What you should do:
copy all the files you wish to place under version control to a directory on your local machine.
delete them and their containing directory on the remote host.
still on the remote host create a new directory called projectname.git (substitute a meaningful name for projectname
), cd into it, and run git init --bare
on your local machine, in the directory in which you've placed your files:
git init
to initialise a git repogit add .
to add all files and sub-directoriesgit commit -m "Initial commit"
[master agd27c9] Initial commit
git remote add origin ssh://hostaddress/path/to/dir/projectname.git
(you may have to modify this slightly, if you usually access your remote host using ssh://user@hostaddress, for instance)git push origin master
Counting objects ...
Delta compression ...
Writing objects ...
Total ...
To ssh:// ...
git config branch.master.remote origin && git config branch.master.merge refs/heads/master