I (finally) convinced my manager to let us establish version control and spent several years doing some research and decided on git. In any case, I found the tutorial here http://toroid.org/ams/git-website-howto on the basic setup, which will lead to changes in the remote repository. This is perfect for our company.
Here are the steps that I went through
Local block
cd /website git init git add . git commit -m "Initial commit into git"
server
cd /var/git/ mkdir website.git cd website.git git init --bare mkdir /var/www/website cat > hooks/post-receive #!/bin/sh GIT_WORK_TREE=/var/www/website git checkout -f
chmod + x hooks / post-receive
Local block
git remote add web ssh:// user@server /var/git/website.git git push web +master:refs/heads/master
Now, when I do a push, I get the error message "This operation should be performed in the work tree." This comes from the post-receive hook. I know that I am missing a step, but I just donβt know what it is ...
source share