# Git merge

> Git merge is an open-source agent skill for developer tools. Guides an agent through merging a feature branch into the default branch with inspection. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/aws-solutions/konductor/tree/main/skills/git-merge
- **Repository:** https://github.com/aws-solutions/konductor
- **GitHub stars:** 12
- **License:** Apache-2.0
- **Skill name:** git-merge
- **Collection:** https://github.com/aws-solutions/konductor
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill walks an AI coding agent through merging a feature or dev branch into the default branch using a non-fast-forward merge that is staged but not committed. That lets the agent and user inspect the diff summary and run the build and tests before the merge commit is created.

The workflow has two main phases. First, the default branch is pulled into the feature branch and any conflicts are resolved there. Second, the feature branch is merged into the default branch, with a confirmation step before committing and pushing. The skill also covers pre-commit checks, handling lockfile conflicts by regenerating them, backing out safely with merge abort or a non-destructive reset, and recovering when a push is rejected. Optional release tagging and branch cleanup steps are included.

The skill expects a git repository with a default branch and the user's own build and test commands. If merges go through pull requests, the skill directs the agent to open one instead, and it points to a separate code-review skill for that.

## When your agent uses it

> Merges a feature or dev branch into the default branch with --no-ff --no-commit so the merge can be inspected and built before it is committed. Use for branch, release and sync merges, merge conflicts (lockfiles too) or a half-done merge; if merges go through PRs, open a PR. The code-review skill opens PRs.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/aws-solutions/konductor/tree/HEAD/skills/git-merge)
- [License: Apache-2.0](https://github.com/aws-solutions/konductor/tree/HEAD/skills/git-merge)

## Features

- **Non-fast-forward merge:** Creates merges with --no-ff and --no-commit so history is kept and the result can be checked first.
- **Pre-commit verification:** Checks for unmerged paths, leftover conflict markers and whitespace errors, then runs the repo's build and tests.
- **Two-phase merge flow:** Syncs the feature branch with the default branch first, then merges the feature branch back in.
- **Conflict and lockfile handling:** Explains how to resolve source conflicts and regenerate lockfiles instead of hand-editing markers.
- **Safe recovery steps:** Uses merge abort or a non-destructive reset rather than hard resets or force pushes.
- **Confirmation before pushing:** Requires explicit user approval before merging into or pushing to the default branch.

## Good for

- Merge my feature branch into main with a non-fast-forward merge
- Sync my feature branch with the latest main before merging back
- Resolve merge conflicts in package-lock.json during a merge
- Recover from a half-finished merge without losing changes
- Tag a release after merging the dev branch

## Install

### Claude Code

This skill ships in the `konductor` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add aws-solutions/konductor
/plugin install konductor@konductor
```

Or copy only this skill to `~/.claude/skills/git-merge`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-solutions/konductor.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-merge &&
cp -R "$tmp/skills/git-merge" ~/.claude/skills/git-merge &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/git-merge` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/git-merge` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-solutions/konductor.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-merge &&
cp -R "$tmp/skills/git-merge" ~/.agents/skills/git-merge &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/git-merge` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/git-merge` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-solutions/konductor.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-merge &&
cp -R "$tmp/skills/git-merge" ~/.cursor/skills/git-merge &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/git-merge` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/aws-solutions/konductor.git --path skills/git-merge
```

Or copy the folder to `~/.gemini/skills/git-merge` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/git-merge`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-solutions/konductor.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-merge &&
cp -R "$tmp/skills/git-merge" ~/.copilot/skills/git-merge &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/git-merge` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/aws-solutions/konductor.git
```

Then copy `konductor/skills/git-merge` into your agent's skills folder as `git-merge`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Git merge trigger?

It is meant for branch merges, release merges, merge conflicts including lockfiles, and half-finished merges. Trigger words include merge, merge branch, merge into main and release merge.

### Does Git merge commit or push on its own?

No. The merge is staged first, the diff summary is shown, and the user must confirm before the commit and push happen.

### What if the repository uses pull requests?

The skill tells the agent to open a pull request from the feature branch instead of merging locally, and to refer to the code-review skill for that.

### Does Git merge force-push or rebase?

No. The skill states that force-pushing and rebasing shared branches are not allowed.

### How do I install Git merge in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/git-merge to use it in all your projects, or to .claude/skills/git-merge in one project. Or install the konductor plugin, which includes it: /plugin marketplace add aws-solutions/konductor, then /plugin install konductor@konductor.

### Does Git merge run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Git merge?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Git merge?

The closest alternatives to Git merge are Fix merge conflicts, Resolve merge conflicts, Git workflow and versioning, GitHub workflow and Git workflow.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Fix merge conflicts](https://ai-powered.com/skills/fix-merge-conflicts): Fix merge conflicts is an open-source agent skill for developer tools.
- [Resolve merge conflicts](https://ai-powered.com/skills/resolve-merge-conflicts): Resolve merge conflicts is an open-source agent skill for developer tools.
- [Git workflow and versioning](https://ai-powered.com/skills/git-workflow-and-versioning): Git workflow and versioning is an open-source agent skill for developer tools.
- [GitHub workflow](https://ai-powered.com/skills/github-workflow): GitHub workflow is an open-source agent skill for developer tools.
- [Git workflow](https://ai-powered.com/skills/git-workflow-aws-solutions): Git workflow is an open-source agent skill for developer tools.
- [Git and release ops edho ferdian](https://ai-powered.com/skills/git-and-release-ops-edho-ferdian): Git and release ops edho ferdian is an open-source agent skill for developer tools.
- [Commit push](https://ai-powered.com/skills/commit-push): Commit push is an open-source agent skill for developer tools.
- [Rebase current branch](https://ai-powered.com/skills/rebase-current-branch): Rebase current branch is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/git-merge
