8000 Added cross repo comparision · GulyaevB/github-cheat-sheet@307aa00 · GitHub
[go: up one dir, main page]

Skip to content

Commit 307aa00

Browse files
committed
Added cross repo comparision
1 parent 8f6c719 commit 307aa00

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,19 @@ https://github.com/rails/rails/compare/master@{2014-10-04}...master
235235
```
236236
which allows you to see the difference on the master branch up a set time ago or a specified date.
237237

238+
### Compare branches cross forked repositories
239+
240+
To use GitHub to compare branches across forked repositories, change the URL to look like this:
241+
242+
```
243+
https://github.com/user/repo/compare/{foreign-user}:{branch}...{own-branch}
244+
```
245+
246+
eg.:
247+
```
248+
https://github.com/rails/rails/compare/byroot:idempotent-counter-caches...master
249+
```
250+
238251
## Line Highlighting in Repos
239252

240253
Either adding `#L52` to the end of a code file URL or simply clicking the lin number will highlight that line number.

0 commit comments

Comments
 (0)
0