Using git to just monitor changes on a webserver
I am tasked with monitoring the changes made to the source files of a website. I am not developing the website, just watching it. I am a firm believer in using version control, and am a fan of git, but the developer who is actually maintaining the site is not, and I have decided it is better to let him continue to work however he wants (don’t ask). I do not want to have to give him any instructions whatsoever (except possibly telling him that I am adding files or directories that he can ignore).
I consider myself an intermediate-level user of git, so I want to run this by an expert or two.
I am thinking I can install git on the (Linux) server, and then ask for status, and do commits, via SSH. Will this work without jeopardizing the normal operation of the web server?
One Solution collect form web for “Using git to just monitor changes on a webserver”
Yes, using Git on a server should not interfere with the normal operation of the server (as mentioned in the comments, doing this on a production server is dodgy but I’ll leave that to one side.)
Note that using Git normally will create a
.git directory at the root of whatever you’re tracking. If that is your web server root directory, you might want to consider whether this is a risk as far as external access to the contents of the
.git directory (depending on your server setup, this may or may not be a concern).
If you want to create the
.git directory somewhere else outside your working tree, see the
GIT_DIR environment variable.