From d0126edd1ef8f42eec2931cd6e517352e9a2f0e8 Mon Sep 17 00:00:00 2001 From: Wassim Metallaoui Date: Fri, 17 May 2024 12:01:14 -0500 Subject: [PATCH] docs: improve the usage instructions --- README.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3366f73..041c9ea 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,36 @@ -# gh-compare +## gh-compare -This is [`gh`](https://cli.github.com/) extension to replace the [`compare`](https://hub.github.com/hub-compare.1.html) command in the mostly deprecated tool, [`hub`](https://hub.github.com/). +This is a [`gh`](https://cli.github.com/) extension to replace the [`compare`](https://hub.github.com/hub-compare.1.html) command in the mostly deprecated tool, [`hub`](https://hub.github.com/). -## Installation +### Installation ```shell gh extension install wassimk/gh-compare ``` -## Usage +### Usage + +Compare the current branch against the `main` branch. ```shell gh compare +``` + +Compare the current branch against another branch. + +```shell gh compare other_branch -gh compare main...my-branch +``` + +Compare any two branches. + + +```shell +gh compare their_branch...my_branch +``` + +Compare any two commits. + +```shell gh compare 7a67154..205b073 ```