Gallery:Using Git - Gallery Codex
Personal tools

Gallery:Using Git

From Gallery Codex

Introduction

Gallery 3 uses Git for revision control. We host our main repository on GitHub. Everybody is welcome to download our code directly from GitHub and track our progress. See the latest commits

More information for users with SSH server access who are comfortable working on the command line can be found on the Git FAQ page:

If you are not comfortable working with command lines and just want to download the latest contributions (modules, themes, etc) from Git, you will have to download the complete package of contributions. This package is available from the download link at the top of the gallery3-contrib page: gallery3-contrib

Note There is no way to download individual modules directly from Git at this time. Some contributor modules are available from forum posts, as attachments and others are available via links to the contributor's website. The following Gallery Codex page lists the main contributed modules (list is not complete). Follow the download links from there:

Getting the code

Run this command:

git clone git://github.com/gallery/gallery3.git

This will create a "gallery3" directory on your local system with the latest code.

If you would like to checkout to a different directory (not to "gallery3") then do:

git clone git://github.com/gallery/gallery3.git <directory name>

Getting code updates

At any time, from your gallery3 directory, you can run:

git pull

That'll update what you have to the latest version.

Forcing a pull if you have edited files, you can run:

 git reset --hard HEAD && git pull

Installing Git on Windows

  • Download msysGit from Google Code.
  • Run the executable.
  • Click Next until you get to the Adjusting your PATH environment and select "Use Git Bash only".
  • On the next screen select "Use OpenSSH".
  • On the next screen select "Use Unix style line endings".
  • Finish the install like every other program.
  • Run the "Git Bash" Program and type in the following
$ ssh-keygen -C "your@email.com" -t rsa

Use your own email address, the default file name (id_rsa), and provide a password. The key will be stored in your profile, e.g.: C:\Documents and Settings\YourNameHere\.ssh\ on XP or C:\Users\YourNameHere\.ssh\ on Vista.

$ git config --global user.name "Your Name Here"
$ git config --global user.email your@email.com
  • Then change to the folder you want the gallery3 folder in. Remember that this box is a linux style command prompt so you have to use linux commands not dos commands. You are now ready to use git to download a copy of G3 using Git (See above). If you don't want to use git you can also download a snapshot.


Advanced Topics

See Gallery:Using_Git:Advanced_Topics for a discussion of some of the more advanced things you can do with Git.