Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

GIT auto merge tool with branch dependencies, merge preprocessing and hooks

Project Description


GIT auto merge tool


merGeIT allows to handle git push events and do automatic merges
according to configured branch dependencies.

How it works

First of all you define branch dependencies in a way *"source-target branches"*.
The *source* branch is defined as regular expression.
All *target* branches are defined as list under *source* branch section.

Optionally filters and hooks can be defined for each dependency.
Filters can cancel merge or change target branch before merge depending on push event info.
Hooks are mostly used to send notifications about merge result,
close tasks in task manager or cancel push merge if i. e. unittests fails.

When push event occurs on some branch, push handler matches name of this branch
across all patterns and runs *merge process* for *source* into *target*.
The *merge process* is completed in 3 steps:

* Executing filters
* Actual GIT merge operation
* Executing hooks
* GIT push operation

Both filters and hooks has ability to cancel *merge process*.


* **Branch dependencies** using regexp for source (push) branch matching and list of target (merge) branches
* **Filters** to control merging flow with specific logic
* **Hooks** to notify about success/fail merge events


For each project (repo) there should be one YAML config that defines all branch dependencies and filters/hooks definitions/uses.

The following example explains how to set up simple scheme "Keep *develop* branch up-to-date with *master* updates":

.. code-block:: yaml
- develop

Custom filters and hooks

merGeIT comes with some helpful filters and hooks for Redmine and GitLab located in **extras** module. You can implement similar things for any other software you use. Also, feel free to make pull request to add them to merGeIT repo ;)


Run hook handle server:

.. code-block:: bash

mergeit -H -p 1234 -sh -sp 1235 -c config_samples/full.yaml -l test.log

Display help:

.. code-block:: bash

mergeit -h

Run shell (for manual commands):

.. code-block:: bash

mergeit-shell -c config_samples/full.yaml -l test.log

Connect to server's same shell via telnet (while mergeit server running):

.. code-block:: bash

telnet localhost 1235

Simplest config example

Coming soon


Install package:

.. code-block:: bash

python3 install

Run tests (optionally):

.. code-block:: bash

python3 -m unittest discover tests


* Add support for raw git push hooks (not only gitlab)
* Add ability to configure git remotes somehow

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(11.1 kB) Copy SHA256 Hash SHA256
Source Feb 5, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting