# merge-branch

> Utility to pull from a target git branch and merge it into the current one.

Latest version **1.1.0** (published 2021-10-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install merge-branch
pnpm add merge-branch
yarn add merge-branch
bun add merge-branch
```

Provides the command `merge-branch`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-10-24 |
| First published | 2021-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.8.0 |
| Dependencies | 2 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Giacomo Venturini |
| Maintainers | flamingturi |

## Links

- npm: https://www.npmjs.com/package/merge-branch
- Repository: https://github.com/FlamingTuri/merge-branch
- Homepage: https://github.com/FlamingTuri/merge-branch#readme
- Issues: https://github.com/FlamingTuri/merge-branch/issues
- npm.io page: https://npm.io/package/merge-branch

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^17.0.1
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.4

## Recent versions

- 1.1.0 (latest) — 2021-10-24
- 1.0.1 — 2021-10-17

## README

# merge-branch

Usually, feature and fix branches are called with hard to remember/type names, like feature/#XXXXXX or fix/#YYY (where X and Y are usually numbers). Before creating a pull request, it is a common practice to previously align the feature/fix branch with the latest content of the target one.

`merge-branch` aims to speed up such task, by switching to a target branch, pulling its latest changes and merging them back into the starting branch.

Assuming the current working directory is a git repository and the current branch is called `feature/#ABCXYZ`, the following steps will be performed with the default configuration:

```
git checkout develop
git pull
git checkout feature/#ABCXYZ
git merge --no-ff develop
```

## Installing

```bash
npm install -g merge-branch
```

To install the latest version with security updates applied target `@dev` tag:

```bash
npm install -g merge-branch@dev
```

## Usage

Obviously target branch and merge strategy can be customized. This is `merge-branch` usage:

```bash
Utility to pull from a target git branch and merge it into the current one.

Options:
  -b, --branch   Define the target git branch  [default: "develop"]
  -c, --command  The merge command to run on the current branch  [default: "merge --no-ff"]
  -h, --help     Show help
  -v, --version  Show version number
```

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/merge-branch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
