Using Git or SVN with a web server

I currently have a site that is in development, it’s deployed on a web server, and myself as well as one other developer are actively working on the site. We currently have no version control, periodically we backup the work, but for the most part, we are both just working off the server. I’ve used both GIT and SVN on projects that are run and compiled locally, but never in a situation where it was deployed on a web server. I’m wondering what the typical setup is. I would like to be able to use SVN or GIT for version control, but also be able to publish from that repository to the live web server. Is there a way this is typically done?

  • SVN Error E175002
  • SVN Repo gives 404 not Found
  • Error Failed loading opcache.so: opcache.so: undefined symbol: compiler_globals - Apache 2.4 / PHP 5.5 / Ubuntu 12.10 VPS
  • Modifying apache to prevent public accessibility of .git folder
  • Apache basic authentication issue with reverse proxy
  • Configure .htaccess file for multiple environments
  • “Invalid remote: origin” error when importing to Eclipse (m2eclipse, eGit)
  • Best (and safest) way to merge a git branch into master
  • Bower + Git submodules + Docker compose
  • When one adds an untracked file, does it not go to staged immediately?
  • How to undo last commit
  • git freezing at push while compressing objects
  • 2 Solutions collect form web for “Using Git or SVN with a web server”

    You would have three checkouts: one for you and your partner, and one for the web server. Whenever you want to deploy, just update the checkout on the web server.

    If you want live updates, you could set up a server-side Subversion/Git commit hook that would automatically update the repository for the web server and (if needed) restart the server after every commit (or push, in case of Git). Consult the documentation of the corresponding version control system.

    Here is a good tutorial on how to do this w/ apache and linux. It has worked out for me and is really quite simple to follow.

    http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt

    Git Baby is a git and github fan, let's start git clone.