skip to content

Integration of git in Redmine

When using Redmine, the version control system git can be used in a particularly simple way. The close integration of git and Redmine has two main advantages:

  • The project manager determines who has access to the git repository through membership in the Redmine project. Therefore, access to the project-specific git repository is limited to the current project members and ends with the departure from the project.
  • The web interface of Redmine can display the associated revisions of the git repository. In this way, the changes made can be displayed in an overview (for example, as diffs in two columns next to each other). The parallel strands of software development (and their merging) are also visually prepared and displayed.

It is also possible to use advanced techniques in software development through so-called hooks from Git, for example, a service like Jenkins that offers continuous integration of changes.

Simple example for the usage of git

Similar to the example in the general git instructions, this example shows how a git repository linked to a Redmine project can be used with git command line commands. Of course, graphical interfaces (e.g. IDEs) with git functionality can also be used.

In this example, the name "superprojekt" is used. Instead of "superprojekt", the identifier (lowercase, without spaces) of the actual Redmine project should be used.

  1.  git clone 

    Here, the username and password are asked for. For members of the University of Cologne, these are the data of the student or staff account.
  2.  cd superprojekt

  3.  echo something > foobar

  4.  git add foobar

  5.  git commit -m "No Comment"

  6.  git push origin master

    In this step, the user must again enter their username and password.

In this example, the commands shown are deliberately kept simple and do not demonstrate the many advantages that git offers.

Specialties in using git

More than one git repository

In contrast to Subversion, only the complete tree of a project can be requested with git. Therefore, it is not possible to work with only part of the project archive. If it is expected that certain users should only have access to parts of the repository or do not want to download the entire code due to space constraints, multiple git repositories can be created for better division in a project. To do this, create a subproject in the existing Redmine project (on the overview page, top right) and name it so that the identifier of the subproject allows for a conclusion about the parent project. For example, for the superprojekt project, two subprojects could be called super-toll and super-mega. If you use the Inherit Users function, all users of the parent project can also access the subproject. Exceptions to this and additional users who are allowed in the subproject but not in the parent project can also be defined later.

To then also set up a git repository for such a subproject, please contact with the identifier of the subproject.

Access to the subproject repository is only possible with the identifier of the subproject (without the name of the parent project). For the aforementioned subproject super-toll under superprojekt, the git access would therefore be via and not via or similar.

Change ticket status from git

Tickets can be closed directly from git (without using the web interface) via the commit message, for example.

If you have any questions or problems, please contact the RRZK-Helpdesk