I\'m an avid git user; I use git in development; in staging, but not in production.
Are there any good reasons not to use git below the web root (/var/www/) in a pr
Apart from the obvious aesthetic reason, permissions can often be a problem when you have a repository in /var/www.
On my production server, I have a bare repository in a private directory on branch production
and a detached worktree in /var/www (see the core.worktree
setting). Additionally, I have a post-receive hook to run git checkout -f
, so all I have to do from my local computer is push to the production
branch, and the rest is automatically taken care of.