Using git to develop sites (developers only)


Warning: Use of undefined constant vs - assumed 'vs' (this will throw an Error in a future version of PHP) in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 38

Warning: Use of undefined constant simplicity - assumed 'simplicity' (this will throw an Error in a future version of PHP) in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 38

Warning: A non-numeric value encountered in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 38

Warning: A non-numeric value encountered in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 38

We have recently moved our Drupal and WordPress repositories to git. We will also be putting our databases and static site filesystems there too, so we can generate test sites locally with a simple script. Here’s how to get started with developing sites:

Installing and configuring Git

  • Mac OS X: Go to download page and download the latest version.
  • On Windows: Go to download page and download Git-{version}-preview{release date}.exe

To configure git, there are some nice instructions here…

(VS Users: Aparajita has supplied in ticket SYSADM-610 to configure your git install: just download it, use Terminal to go to the directory where the script is, and type sh git_setup.sh. You will be asked for full name and email address.)

Using git

To create a version of the Drupal or wordpress repository on your local site, create a directory. Open Terminal, go to that directory and use:

git clone git@{servername}.vasudevaserver.net:drupal.git
or
git clone git@{servername}.vasudevaserver.net:wordpress.git

This will put the contents of the repository in that folder. Note: If the repository uses gitolite to control access via ssh, you must have the appropriate ssh keys on your machine to do this. In addition, you need to have these lines in your .ssh/config file


host gitolite
user git
hostname {server}.vasudevaserver.net
port {port_name}

To make changes to the repository, you have a few options:

  • Use the command line ๐Ÿ™‚
  • There is a git client called SmartGit which is free for non-commercial purposes. We are still in the initial stages of testing it, but right now it seems to have everything we need
  • There is a application called GitX which has a very nice interface that shows all commits and lets you commit to your local version of the repository. However (at the moment) you still need to use the command line to update your local filesystem from the server repository (using Terminal, go to the directory and type git pull) and then push your changes back to the server repository (git push)

Warning: Use of undefined constant vs - assumed 'vs' (this will throw an Error in a future version of PHP) in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 41

Warning: Use of undefined constant simplicity - assumed 'simplicity' (this will throw an Error in a future version of PHP) in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 41

Warning: A non-numeric value encountered in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 41

Warning: A non-numeric value encountered in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/single.php on line 41

Warning: count(): Parameter must be an array or an object that implements Countable in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/comments.php on line 33

Warning: count(): Parameter must be an array or an object that implements Countable in /home/vssrvorg/public_html/wp-content/themes/vs-simplicity/comments.php on line 34

Comments are closed.