1hub-compare(1) hub manual hub-compare(1)
2
3
4
6 hub-compare - Open a GitHub compare page in a web browser.
7
9 hub compare [-uc] [-b BASE]
10 hub compare [-uc] [OWNER] [BASE...]HEAD
11
13 -u, --url
14 Print the URL instead of opening it.
15
16 -c, --copy
17 Put the URL to clipboard instead of opening it.
18
19 -b, --base BASE
20 Base branch to compare against in case no explicit arguments were
21 given.
22
23 [BASE...]HEAD
24 Branch names, tag names, or commit SHAs specifying the range to
25 compare. If a range with two dots (A..B) is given, it will be
26 transformed into a range with three dots.
27
28 The BASE portion defaults to the default branch of the repository.
29
30 The HEAD argument defaults to the current branch. If the current
31 branch is not pushed to a remote, the command will error.
32
33 OWNER
34 Optionally specify the owner of the repository for the compare page
35 URL.
36
38 $ hub compare
39 > open https://github.com/OWNER/REPO/compare/BRANCH
40
41 $ hub compare refactor
42 > open https://github.com/OWNER/REPO/compare/refactor
43
44 $ hub compare v1.0..v1.1
45 > open https://github.com/OWNER/REPO/compare/v1.0...v1.1
46
47 $ hub compare -u jingweno feature
48 https://github.com/jingweno/REPO/compare/feature
49
51 hub-browse(1), hub(1)
52
53
54
55
56hub version 2.14.2 20 Jul 2023 hub-compare(1)