Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ten Things You Didn't Know Git And GitHub Could Do
1. Ten Things You Didn't
Know Git And GitHub
Could Do
Owen Ou
@JingwenOwenOu
http://owenou.com/2012/01/13/ten-things-you-didnt-
know-git-and-github-could-do.html
Saturday, 19 January, 13
2. Agenda
• 10 GitHub tricks
• Demo of GitHub tricks
• 10 Git tricks
• Demo of Git tricks with pull request
Saturday, 19 January, 13
3. Ten GitHub Tricks
http://octodex.github.com/front-end-conftocat
Saturday, 19 January, 13
8. commits by range
• github.com/user/repo/compare/{range}
• range = sha1...sha2 or master...my-branch
• time can be considered:
master@{time}...master
• e.g. master@{2012-01-01}...master
Saturday, 19 January, 13
9. commits by range
https://github.com/rails/rails/compare/
master@{1.day.ago}...master
Saturday, 19 January, 13
11. commits by author
https://github.com/dynjs/dynjs/commits/
master?author=jingweno
Saturday, 19 January, 13
12. .diff & .patch
• Add .diff or .patch to the URLs of compare
view, pull request or commit page
• diff or patch in text format
• e.g., easy for building tools
Saturday, 19 January, 13
15. line linking
• any file view
• click one line or multiple lines by pressing
SHIFT
• good for sharing link to a chunk of code
Saturday, 19 January, 13
16. line linking
https://github.com/jingweno/dotfiles/blob/
master/.gitconfig#L5-L9
Saturday, 19 January, 13
17. subscribing peoples
Mentioning users in pull requests, issues or
any comment will subscribe them to all
subsequent notifications
Saturday, 19 January, 13
18. autolink
• In pull requests, issues or any comment, sha
and issue number will be automatically
linked
• link sha or issue number from another
repository with the format of user/
repo@sha1 or user/repo#1
• e.g. rails/rails#1
Saturday, 19 January, 13