This solution is how to create a remote git repository and push your local files.
cd /opt/git
mkdir MYPROJ.git
cd MYPROJ.git
git --bare init
cd /MYPROJ
git init
git add *
git commit -a -m 'my initial commit'
git remote add origin ssh://SERVER/opt/git/MYPROJ.git
git push origin master
# single file change
$ git checkout FILENAME
# revert all changes
$ git checkout -f