サーバー上にまず共有リポジトリを作成する。
mkdir Repo.git
cd Repo.git
git init --bare --shared=true
そして、
hooksフォルダ内のpost-receiveファイルを編集
(cd /home/admin/workspace/folder/;git --git-dir=.git pull;実行したいコマンド;)
サーバーのコピー先folderにて、
git clone Repo.git
ローカルマシンの、開発中のフォルダで
git init
git remote add origin ssh://admin@---/home/admin/workspace/---.git
git add .
git commit -m "initial import"
git push origin master