PHPackages                             git-automerge/php-automerge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. git-automerge/php-automerge

ActiveLibrary[CLI &amp; Console](/categories/cli)

git-automerge/php-automerge
===========================

CLI tool to auto-merge git branches and tag.

01PHP

Since Jul 14Pushed 10mo agoCompare

[ Source](https://github.com/git-automerge/php-automerge)[ Packagist](https://packagist.org/packages/git-automerge/php-automerge)[ RSS](/packages/git-automerge-php-automerge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AutoMerge
=========

[](#automerge)

**AutoMerge** is a CLI tool to automate merging multiple remote Git branches into a temporary branch, tagging that branch with an environment-specific tag, pushing the tag to origin, and cleaning up afterward.

---

Features
--------

[](#features)

- Reads configuration from a YAML file defining multiple environments
- Supports wildcard patterns for included remote branches to merge
- Creates a temporary branch from a base branch before merging
- Tags the merge commit with an environment name and timestamp
- Pushes the tag to the remote repository
- Automatically cleans up the temporary branch and local tag
- Supports optional customizable tag prefix per environment

---

Installation
------------

[](#installation)

Install via Composer:

(Optional) Add post script to create symlink

```
"scripts": {
  "post-install-cmd": [
    "[ -L automerge ] || ln -s vendor/bin/automerge automerge"
  ],
  "post-update-cmd": [
    "[ -L automerge ] || ln -s vendor/bin/automerge automerge"
  ]
}
```

```
composer global require git-automerge/php-automerge
```

(Optional) create symlink

```
ln -s vendor/bin/automerge automerge

```

Usage
-----

[](#usage)

```
vendor/bin/automerge
```

Configuration Example (automerge-config.yaml)
---------------------------------------------

[](#configuration-example-automerge-configyaml)

Create a automerge-config.yaml file in your project root with this structure:

```
staging:
  base: main
  branches:
    - "bugfix/*"
  tag_prefix: "prod-"      # Optional; Default is "automerge-" if empty or false, no prefix used

feature:
  base: develop
  branches:
    - "feature/*"
  tag_prefix: false # omitted here; no prefix will be used
```

The script will:
----------------

[](#the-script-will)

- Check your working directory is clean.
- Fetch all remote branches.
- Create a temporary branch from the base branch.
- Merge all matching remote branches.
- Tag the commit with a timestamp and environment name.
- Push the tag to the remote.
- Clean up local temporary branch and tag, and restore your original branch.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/21dcb9c8370191d8e148d5d118d7ddd12c9fb465d635f1314bfbbda78d8c610f?d=identicon)[boehsermoe](/maintainers/boehsermoe)

---

Top Contributors

[![boehsermoe](https://avatars.githubusercontent.com/u/2466744?v=4)](https://github.com/boehsermoe "boehsermoe (15 commits)")

### Embed Badge

![Health badge](/badges/git-automerge-php-automerge/health.svg)

```
[![Health](https://phpackages.com/badges/git-automerge-php-automerge/health.svg)](https://phpackages.com/packages/git-automerge-php-automerge)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
