Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/starptech/branch-comparer
Checkout multiple git branches, execute scripts and log the results
https://github.com/starptech/branch-comparer
checkout git nodejs
Last synced: 5 days ago
JSON representation
Checkout multiple git branches, execute scripts and log the results
- Host: GitHub
- URL: https://github.com/starptech/branch-comparer
- Owner: StarpTech
- License: mit
- Created: 2017-10-31T21:45:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T17:32:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T23:42:16.428Z (about 1 month ago)
- Topics: checkout, git, nodejs
- Language: JavaScript
- Homepage:
- Size: 466 KB
- Stars: 26
- Watchers: 3
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge)
[![NPM version](https://img.shields.io/npm/v/branch-comparer.svg?style=flat)](https://www.npmjs.com/package/branch-comparer)
# branch-comparer
Checkout multiple git branches, execute scripts and return to the origin branch.
Ideally to run benchmarks in different branches and copy & paste the results in a PR.## Features
- Select multiple branches from a list
- Run scripts multiple times in a row
- Execute any command synchronously
- Return to origin branch after finish
- Write results in files or console
- Gitflow mode which compares current branch with master (configurable)## Installation
```
npm i -g branch-comparer
```
## Usage
Print the results in the console
```sh
branchcmp
```
Print results in files
```sh
branchcmp --file --script "node -v"
```
_Will create files in form of `branch..log` in the current working directory._Run scripts two rounds and save the results in files
```sh
branchcmp --file --rounds 2 --script "node -v"
```
_Will create files in form of `branch..round-.log` in the current working directory._## Help
```
branchcmp -h
```## Example
![example](https://github.com/StarpTech/branch-comparer/blob/master/branchcmp.gif "Example branchcmp")