Quick 5-Minute Guide to Repository Integration in Redmine

2025-10-21  •  Tags:  •  Lyu Shengnan

Quick 5-Minute Guide to Repository Integration in Redmine

In this article, we’ll take a closer look at Redmine’s repository integration feature and explain how it works in simple terms.

Table of Contents

Overview

Repository Website
Repository screen on the official Redmine website

Redmine can be used for various purposes such as project management, task tracking, and handling inquiries. Among these, it is particularly well-suited for software development projects. One of the key features that enables this is repository integration.

Redmine can integrate with version control systems such as Subversion (SVN) and Git, allowing users to view source code, track code changes, and even update issue information automatically when code changes are committed—all from within Redmine.

A real-world example is the development project of Redmine itself. The official Redmine website is built using Redmine, and the Redmine source code is managed in Subversion. The repository is linked to the Redmine instance on the official site, allowing anyone to view the source code and change history on the Redmine repository page.

Features

When you integrate Redmine with a version control system, you can:

Browse Source Code and History

You can view source files and their revision history directly from Redmine’s Repository tab.
Normally, this would require command-line tools or specialized apps, but with integration, everything is available in your browser.

Viewing Source Code
Viewing Source Code

Link Issues and Revisions

You can link Redmine issues with revisions (change sets) in your version control system.

For example, if you’re working on issue #10 and commit code changes related to it, you can reference the issue number in your commit message. This automatically adds a comment to the issue, including a link to the revision and its diff view.

Repository Interlink
Information about source code changes and related links are added to issue comments.

By linking issues and revisions, you gain several benefits:

  • You can quickly confirm whether the work described in an issue was actually completed by checking the corresponding source code.
  • From the repository screen, you can trace any code change back to its related issue to understand why that change was made.

Setting Up Repository Integration

To use the repository integration feature, you need to enable the Repository module in your project settings. Only users who are members of the project and have roles with the “Edit project” and “Select modules” permissions can change this setting. If you ran load the default configuration during the initial setup of Redmine, these permissions are granted to the Manager role, so assigning that role is the easiest way to proceed.

In the project menu, go to SettingsProject, check the box for Repository under Modules, and click Save.

Repository Module
Check “Repository” in the list of modules

Tip: When creating a new project, you can enable the Repository module right away if you know you’ll need it.

Registering a Repository

Only users with the "Manage repository" permission can register a repository.
By default, this permission is also included in the Manager role.

To register a repository, open SettingsRepository from the project menu and click New repository.

New Repository
Click "New repository"

In the New repository screen, select the version control system you’re using, enter the access URL, and click "Create".

The following example shows a Subversion repository configuration.

New Repository Form
"New repository" form

Viewing the Repository

Once a repository has been registered, the Repository menu appears in the project. If it does not appear, please refer to the Registering a Repository section above and make sure the repository has been set up correctly.

Click Repository to open the repository browser.

Repository Overview
Repository Overview

At the top of the page, the source tree is displayed. Click directory names to navigate, or file names to view file contents.

At the bottom of the page, recent change sets are listed. Click "View differences" to display the latest code changes.

How to Link Issues and Revisions

To link issues and revisions, include reference keywords and issue numbers in your commit messages when committing changes to your version control system. Use one of the following formats (nnn represents the issue number):

refs #nnn
references #nnn
IssueID #nnn

For example, to reference issue #10, write a commit message like this:

Small revision for testing refs #10

This automatically creates a link to issue #10 in the repository view.

Repository Link
Linked to issue #10

On the issue side, a new tab labeled Associated revisions appears, displaying the commit message and a link to the revision and diff view.

Repository Issue
Issue with a link to the repository view

Redmine’s repository integration feature greatly improves efficiency in software development projects and contributes to higher-quality deliverables. If your team uses Git or Subversion, this feature is well worth exploring.

Explore Redmine's capabilities firsthand on the demo site: demo.redminecloud.net

Return to the "Quick 5-Minute Guide to Redmine" Article List

Created: 2025-10-21  •  Tags: