8000 GitHub - heshizhu/github-cheat-sheet at 69f0c769c57bab1db688bf37cd026cf436ddef9d
[go: up one dir, main page]

Skip to content

heshizhu/github-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Cheat Sheet

A collection of cool hidden and not so hidden features of Git and GitHub. This cheat sheet was inspired by Zach Holman's Git and GitHub Secrets talk at Aloha Ruby Conference 2012 (slides) and his More Git and GitHub Secrets talk at WDCNZ 2013 (slides).

Shortlink: http://git.io/sheet

Read this in other languages: English, 한국어, 日本語, 简体中文.

Table of Contents

GitHub

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.

Diff without whitespace

Read more about GitHub secrets.

Adjust Tab Space

Adding ?ts=4 to a diff or file URL will display tab characters as 4 spaces wide instead of the default 8. The number after ts can be adjusted to suit your preference. This does not work on Gists, or raw file views.

Here is a Go source file before adding ?ts=4:

Before, tab space example

...and this is after adding ?ts=4:

After, tab space example

Commit History by Author

To view all commits on a repo by author add ?author=username to the URL.

https://github.com/rails/rails/commits/master?author=dhh

DHH commit history

Read more about the differences between commits views.

Cloning a Repository