From 117ae834f9ab96084f91ba22709386a5fa4a993f Mon Sep 17 00:00:00 2001 From: Tim Green Date: Sat, 12 Apr 2014 21:18:46 +0100 Subject: [PATCH] Comparing Branches --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 6b1678b..05f7261 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,27 @@ To view all commits on a repo by author add `?author=username` to the URL. https://github.com/rails/rails/commits/master?author=dhh ``` +## Comparing Branches + +In GitHub to compare branches, the URL will look something like this: + +``` +https://github.com/user/repo/compare/{range} +``` + +Where `{range} = master...4-1-stable` + +e.g.: +``` +https://github.com/rails/rails/compare/master...4-1-stable +``` + +`{range}` is smart and can be changed to things like: +``` +https://github.com/rails/rails/compare/master@{1.day.ago}...master +``` +which allows you to see the difference on the master branch up to one day ago. + ## Line Highlighting in Repos Adding `#L52` to the end of a code file URL will highlight that line number.