Is it possible to deploy a website using git push
? I have a hunch it has something to do with using git hooks to perform a git reset --hard
on the
dont install git on a server or copy the .git folder there. to update a server from a git clone you can use following command:
git ls-files -z | rsync --files-from - --copy-links -av0 . user@server.com:/var/www/project
you might have to delete files which got removed from the project.
this copies all the checked in files. rsync uses ssh which is installed on a server anyways.
the less software you have installed on a server the more secure he is and the easier it is to manage it's configuration and document it. there is also no need to keep a complete git clone on the server. it only makes it more complex to secure everything properly.