Skip to content

splbio/github-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Github Cheat Sheet

All the hidden and not hidden features of GitHub. Taken from Zach Holmans talk at Aloha Ruby Conference 2012.

Ignore Whitespace

Adding ?w=1 to any diff URL will remove any changes only in whitespace, enabling you to see only that code that has changed.

Cloning a Repo

When cloning a repo the .git can be left off the edge.

$ git clone https://github.com/tiimgreen/github-cheat-sheet

Hub - Git wrapper

Hub is a command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier.

This allows you to do things like:

$ hub clone tiimgreen/toc

Which translates to:

$ git clone git://github.com/tiimgreen/toc.git

git.io

git.io is a simple URL shortner for GitHub.

Gists

Gists are an easy way to work with small bits of code without creating a fully fledged repo.

Gists are also full repos so can be cloned like any other:

$ git clone https://gist.github.com/tiimgreen/10545817

Gists

Keyboard Shortcuts

When on a repo page keyboard shortcust allow you to navigate easily.

Pressing t will bring up a file explorer.

Pressing w will bring up the branch selector.

Pressing s will select the search bar.

To see all of the sortcuts for given page type shift+?

Closing issues with commits

If a particular commit fixes an issue, any of the keywords fix/fixes/fixed or close/closes/closed, followed by the issue number, will close the issue.

$ git commit -m "Refactor code, fixes #12"

Cross-link issues

If you want to link to another issue in the same repo, simple type hash # then the issue number, it will be auto-linked.

To link to an issue in another repo, user_name/repo_name#ISSUE_NUMBER e.g. tiimgreen/toc#12.

Emojis

Emojis can be generated on Pull Requests, Issues, READMEs, etc. using :name_of_emoji:

:smile:
:poop:

😄 💩

The full list of supported Emojis on GitHub can be found here.

About

Cool features of GitHub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published