Crates.io | probranchinator |
lib.rs | probranchinator |
version | 0.3.1 |
source | src |
created_at | 2023-05-01 00:58:39.750551 |
updated_at | 2023-05-14 23:34:17.307765 |
description | A tool to help you analyse conflicts in git branches |
homepage | |
repository | https://github.com/strowk/probranchinator/ |
max_upload_size | |
id | 853127 |
size | 616,197 |
This is a CLI tool that compares all branches in repository and displays how they can be merged to each other.
Tool compares branches with each other and shows each comparison in a table. Each entry in that table represents an attempt of merging one branch into another. You can receive one of the following results:
Note that clone, fetch and prune operations currently require git
CLI to be installed and available in $PATH
due to compatibility with systems/protocols. Other operations work with cloned repository directly for efficiency. Tool creates temporary local repository in system temporary directory, because analysis of normal merge conflicts leaves working tree in a potentially 'dirty' state and we don't want to mess with user's repository, where unfinished work might be present.
Download a binary from latest release and put it somewhere in your $PATH
.
Tool requires git
CLI to be installed and available in $PATH
.
You can also use install.sh
script with bash
shell.
It will download the latest release and put it in /usr/local/bin
directory.
curl -s https://raw.githubusercontent.com/strowk/probranchinator/main/install.sh | bash
Only limited amount of platforms have prebuilt binaries at the moment: Linux (x86_64 gnu), macOS(x86_64, aarch64) and Windows (x86_64 gnu).
In case if your platform/architecture is not supported, you might need to build the tool from source. You will need to have Rust toolchain installed.
Then you can install the tool with cargo
:
cargo install probranchinator
probranchinator [OPTIONS] --remote <REMOTE> [BRANCHES]...
Example:
probranchinator --remote=https://github.com/strowk/probranchinator-test.git
If you want to examine your local repository, you can use file://
protocol:
probranchinator --remote=file://$PWD
By default probranchinator
will analyse 10 most recently updated branches.
You can override that by passing branches to analyse as CLI arguments:
probranchinator --remote=https://gitlab.com/git-compose/git-compose.git master test-branch-2
or by changing the amount of recent branches to analyse:
probranchinator --remote=https://gitlab.com/git-compose/git-compose.git --recent=2
To exit the program, press q
or Ctrl+C
.
By default, probranchinator
outputs result in interactive format as a terminal UI.
You can also output result in JSON format by passing --output=json
like this:
probranchinator --remote=https://github.com/strowk/probranchinator-test.git --output=json
By default output would be prettified, but you can pass --pretty=false
to disable that.
Other available formats are: