.TH "hub-compare" "1" "18 Oct 2023" "hub version 2.14.2" "hub manual" .nh .ad l .SH "NAME" hub\-compare \- Open a GitHub compare page in a web browser. .SH "SYNOPSIS" .P \fB\fChub compare\fR [\-uc] [\-b \fIBASE\fP] .br \fB\fChub compare\fR [\-uc] [\fIOWNER\fP] [\fIBASE\fP...]\fIHEAD\fP .SH "OPTIONS" .PP \-u, \-\-url .RS 4 Print the URL instead of opening it. .RE .PP \-c, \-\-copy .RS 4 Put the URL to clipboard instead of opening it. .RE .PP \-b, \-\-base \fIBASE\fP .RS 4 Base branch to compare against in case no explicit arguments were given. .RE .PP [\fIBASE\fP...]\fIHEAD\fP .RS 4 Branch names, tag names, or commit SHAs specifying the range to compare. If a range with two dots (\fB\fCA..B\fR) is given, it will be transformed into a range with three dots. .sp The \fIBASE\fP portion defaults to the default branch of the repository. .sp The \fIHEAD\fP argument defaults to the current branch. If the current branch is not pushed to a remote, the command will error. .RE .PP \fIOWNER\fP .RS 4 Optionally specify the owner of the repository for the compare page URL. .RE .br .SH "EXAMPLES" .PP .RS 4 .nf $ hub compare > open https://github.com/OWNER/REPO/compare/BRANCH $ hub compare refactor > open https://github.com/OWNER/REPO/compare/refactor $ hub compare v1.0..v1.1 > open https://github.com/OWNER/REPO/compare/v1.0...v1.1 $ hub compare \-u jingweno feature https://github.com/jingweno/REPO/compare/feature .fi .RE .SH "SEE ALSO" .P hub\-browse(1), hub(1)