mergito
v0.0.2
Published
CLI tool for merging Git branches
Downloads
33
Readme
Mergito
A CLI tool that helps you merge Git branches.
Mergito merges your current branch into a target branch, then returns you to where you started. It checks out the target branch, pulls the latest changes (if it tracks an upstream), merges your branch in, pushes the result, and switches back to your original branch. If the merge conflicts, it aborts cleanly and leaves you back on your branch.
Usage
mergito [targetBranch] [options]targetBranch is optional and defaults to staging:
mergito # merges into staging
mergito main # merges into mainShow help:
mergito --helpLocal development
Clone the repository and install dependencies:
pnpm installBuild the CLI:
pnpm buildRun without installing globally
node dist/index.js stagingWhile developing, you can recompile automatically in one terminal:
pnpm devThen run the CLI from another terminal after each change:
pnpm build && node dist/index.js stagingInstall globally from your local checkout
To use the mergito command anywhere on your machine without publishing to npm:
pnpm build
pnpm add -g .Then run it like any other CLI tool:
mergito staging
mergito --helpTo remove the global install:
pnpm remove -g mergitoIf the command is not found after installing globally, run pnpm setup and restart your terminal so pnpm's global bin directory is on your PATH.
