docs: update README

This commit is contained in:
Luis Ball 2021-12-03 09:00:34 -08:00
parent 8c72339e65
commit 515548c455
1 changed files with 17 additions and 12 deletions

View File

@ -1,8 +1,10 @@
# gh-stack # gh-stack
> This README and tool were originally written by [@timothyandrew](https://github.com/timothyandrew/gh-stack). I highly recommend reading his blog post on sacked-PR workflows [here](https://0xc0d1.com/blog/git-stack/).
I use this tool to help managed stacked pull requests on Github, which are notoriously difficult to manage manually. Here are a few examples: I use this tool to help managed stacked pull requests on Github, which are notoriously difficult to manage manually. Here are a few examples:
- https://unhashable.com/stacked-pull-requests-keeping-github-diffs-small - https://0xc0d1.com/blog/git-stack/
- https://stackoverflow.com/questions/26619478/are-dependent-pull-requests-in-github-possible - https://stackoverflow.com/questions/26619478/are-dependent-pull-requests-in-github-possible
- https://gist.github.com/Jlevyd15/66743bab4982838932dda4f13f2bd02a - https://gist.github.com/Jlevyd15/66743bab4982838932dda4f13f2bd02a
@ -12,7 +14,9 @@ This tool assumes that:
- All PRs in the stack live in a single GitHub repository. - All PRs in the stack live in a single GitHub repository.
- All remote branches that these PRs represent have local branches named identically. - All remote branches that these PRs represent have local branches named identically.
It then looks for all PRs containing this containing this identifier and builds a dependency graph in memory. This can technically support a "branched stack" instead of a single chain, but I haven't really tried the latter style. With this graph built up, the tool can: It then looks for all PRs containing this containing this identifier and builds a dependency graph in memory.
With this graph built up, the tool can:
- Add a markdown table to the PR description (idempotently) of each PR in the stack describing _all_ PRs in the stack. - Add a markdown table to the PR description (idempotently) of each PR in the stack describing _all_ PRs in the stack.
- Log a simple list of all PRs in the stack (+ dependencies) to stdout. - Log a simple list of all PRs in the stack (+ dependencies) to stdout.
@ -32,21 +36,22 @@ It then looks for all PRs containing this containing this identifier and builds
## Installation ## Installation
```bash ```bash
# Install Rust brew tap luqven/gh-stack
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh brew install gh-stack
# Configure `PATH`
$ export PATH="$HOME/.cargo/bin:$PATH"
# Install `gh-stack`
$ cargo install gh-stack
``` ```
If you cloned this repository, you can build and install from source with: If you cloned this repository, you can build and install from source with:
```bash ```bash
$ cd gh-stack # Install Rust
$ cargo install --force --path . curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Configure `PATH`
export PATH="$HOME/.cargo/bin:$PATH"
# Install `gh-stack`
cd gh-stack
cargo install --force --path .
``` ```
## Usage ## Usage