hub-compare - Man Page

Open a GitHub compare page in a web browser.


hub compare [-uc] [-b BASE]
hub compare [-uc] [OWNER] [BASE...]HEAD


-u, --url

Print the URL instead of opening it.

-c, --copy

Put the URL to clipboard instead of opening it.

-b, --base BASE

Base branch to compare against in case no explicit arguments were given.


Branch names, tag names, or commit SHAs specifying the range to compare. If a range with two dots (A..B) is given, it will be transformed into a range with three dots.

The BASE portion defaults to the default branch of the repository.

The HEAD argument defaults to the current branch. If the current branch is not pushed to a remote, the command will error.


Optionally specify the owner of the repository for the compare page URL.


$ hub compare
> open

$ hub compare refactor
> open

$ hub compare v1.0..v1.1
> open

$ hub compare -u jingweno feature

See Also

hub-browse(1), hub(1)

Referenced By

hub(1), hub-browse(1).

11 Feb 2024 hub version 2.14.2 hub manual