Server:
cd $YOUR_GIT_DIR
git init --bare init $YOUR_PROJECT
Client:
git clone $USER@SERVER_IP:/git/$YOUR_PROJECT
cd $YOUR_PROJECT
git init
cp $YOUR_SRC_CODE . -avR > /dev/null
git commit -m 'initial commit'
git remote add origin $USER@SERVER_IP:/git/$YOUR_PROJECT
git push origin master