Taken from Zach Holman's "Git and Github Secrets".
t - quickly jump through files (similar to cmd+T
in VI or Text Mate)
w - quickly switch branches
s - search
? - keyboard shortcuts help
Awesome command line Github wrapper (repo).
Makes Github related stuff a lot easier.
Example:
$ hub clone rtomayko/tilt
# expands to
$ git clone git://github.com/rtomayko/tilt.git
Alias it to git
, it feels nicer. This is not dangerous because it just adds
more sugar to your git
command.
Wanna see the diff or patch of a commit or the pull request? Just add .diff
or
.patch
to the URL.
Example:
I wanna see what has changed in rails/rails#9105.
Here's where I see it: https://github.com/rails/rails/pull/9105.patch.
Adding ?w=1
ignores white spaces. Use it in commits or anywhere else.
Github translates SVN calls to GIT calls. Not that you care because no one uses SVN without a weapon threat.
You can use it as a prototyping platform.
What does that mean?
Put the CSS file in a Gist. Share it with your colleagues. No one will understand it. Put it in a website and reference this CSS file in a header. Now everyone understands.
Also, praise the awesomeness of Gist.io!
You're looking at it. Isn't it awesome? Minimalistic and all, right? Use it as a blogging platform.
Here's the original gist: https://gist.github.com/4663460
When you mention someone with @username
, that user gets subscribed to the updates.
You can also mention teams with @org/team
. Eg. @github/designers
.
If you mention a SHA in a commit message, Github autolinks to that commit. You can also mention commits in a different repos.
Use user@sha1
for a forked repo and user/repo@sha1
for a different repo.
This works with issues too. To explain, you can use any of these:
- #1
- USER#1
- USER/REPO#1
You can use this to close issues. Example:
closes #1
Works with "fix" too.
Specify your language!
Use ```ruby instead of ```.
It makes a difference.
Just add the author param to the URL.
To see all commits on play/play by @holman, you can use
http://github.com/play/play/commits/master?author=holman
Pull requests are not available only on forks. They work with branches too, use them for better merges. Github uses this internally, they just branch out one repo for all the members of their team. No headaches with permissions.
Embed images inside pull requests!
Syntax:
![title](http://example.com/image.png)
Praise the awesomeness: rails/rails#9001
Why use words when you can use Emoji?
:heart: :+1: :-1: :rage2: :poop:
Here's the cheat sheet:
http://www.emoji-cheat-sheet.com/
Use it to highlight code. Just add #L55 to the file URL if you wish to highlight the line 55 of some file.
Works with ranges too. Proof:
https://github.com/rails/rails/blob/master/activerecord/lib/active_record/core.rb#L82-93
Check it out, it's awesome. This is the format needed:
github.com/user/repo/compare/{range}
{range}
is usually something like MASTER...MY-BRANCH
Add the cool git
features to this and it becomes black magic. To see what has
changed in the last 24 hours, for instance, you can use this:
github.com/user/repo/compare/master@{1.day.ago}...master
master@{yesterday}
and master@{2012-02-25}
also works.
@privefl I have no idea why that doesn't work.