Git support has been recently added to the forge. Repositories are accessible through HTTPS, using the "smart HTTP" method introduced in Git 1.6.6. We recommend Git 184.108.40.206 or later, which fixes some of the issues discovered in the field.
Access control for the Git repositories is integrated with the Redmine forge: public projects allow anonymous clone/fetch but require authentication and authorization for push, and private projects require authentication and authorization for both.
To use the Git repository hosted in a project, you need to follow these steps:
- install the Git client software,
- clone the project's repository and
- push your objects to the repository.
Install the Git client software¶
Install a prepackaged version¶
At the time of this writing (March 2010), the packages in most current distributions' default software repositories are not recent enough. However, up-to-date packages are available from alternate sources, and will be likely integrated into the following releases.
Debian-based GNU/Linux distributions
Debian Testing (Squeeze) and Unstable (Sid) have post-220.127.116.11 versions available in their default repositories. If you're running one of these distributions, you just need to run:
sudo aptitude install git-core
We recommend you install some other packages to obtain additional functionality and documentation:
git-doc, for the Git documentation.
subversion, for accessing Subversion repositories through Git.
gitk, a graphical log viewer.
gitg, a graphical log viewer and commit creation tool.
magit, an Emacs interface for Git.
git-email, for sending commits in a branch as emails to a mailing list.
To install these packages, add them at the end of the above command, separated by spaces.
If you're running an older Debian release or a pre-Lucid Ubuntu distribution, try downloading the
.deb manually from the package website. It works for Ubuntu Karmic (9.10).
If you're using OpenSUSE, there are some post-18.104.22.168 versions in the openSUSE Build Service.
Install from sources (GNU/Linux systems)¶
These instructions are for Debian-based systems. You will have to adapt them to other GNU/Linux environments.
- Install the build dependencies of the
git-corepackage. You can check them using the following command:
apt-cache showsrc git-core
- Install the
docbook2xpackages: these aren't used by the Debian build, but they're required for the default build.
- Download and unpack the latest sources from the official website.
- Go to the main source directory and run this command (as described in the
make prefix=/usr all doc info && sudo make prefix=/usr install install-doc install-html install-info
These steps have been automated in this Bash script. It has been tested on Ubuntu 9.10. The script also installs shell autocompletion for most Git commands, and modifies the prompt to show the current branch when inside of a Git repository or working copy.
Clone the project's repository¶
If the short ID of the project is
myproject, you can clone its Git repository by running:
git clone https://neptuno.uca.es/git/myproject
Work with the repository¶
After cloning the repository, you can work as usual. If you need help using Git, please check the resources in these sites:
- Official Git website
- Official Git wiki
- Some useful resources and course materials have been collected at the OSLUCA Wikiformacion.
- We have slides (see attachments to this article) and videos (session 1, session 2) from a talk we had about Git at the University of Cádiz (in Spanish).
We heavily recommend the Pro Git book, which is freely available in electronic form.