> ## Content Index
> Fetch the complete content index at: https://www.binarysludge.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cool (and sometimes) hidden features of Git and GitHub
- URL: https://www.binarysludge.com/2015/01/22/cool-and-sometimes-hidden-features-of-git-and-github/
- Published: 2015-01-22T18:26:25.000Z
- Updated: 2015-01-22T18:26:25.000Z
- Author: Andrew Martin
- Tags: Programming, git, System Administration, #Import 2026-10-22 12:56

[This repo](https://github.com/tiimgreen/github-cheat-sheet?ref=binarysludge.com) has so much good stuff. Some favourites:

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

---

> To view all commits on a repo by author add `?author={user}` to the URL.  
> [https://github.com/rails/rails/commits/master?author=dhh](https://github.com/rails/rails/commits/master?author=dhh&ref=binarysludge.com)

---

> Compare all Branches to Another Branch  
> `https://github.com/{user}/{repo}/branches`

---

> [Git.io](http://git.io/?ref=binarysludge.com) is a simple URL shortener for GitHub.

---

> When on a repository page:

> Pressing `?` \-> help

> Pressing `t` \-> file explorer.

> Pressing `w` \-> the branch selector.

> Pressing `s` \-> select the Command Bar.

> Pressing `l` \-> edit labels on existing Issues.

> Pressing `y` \-> go to canonical URL

---

> `$ git commit -m "Fix screwup, fixes #12"`

> This closes the issue and references the closing commit.

---

> When on a comment thread and you want to quote something someone previously said, highlight the text and press `r`, this will copy it into your text box in the block-quote format.

---

> In Issues and Pull requests check boxes can be added with the following syntax (notice the space):

```-
- [ ] Prepare dinner
  - [ ] Research recipe
  - [ ] Buy ingredients
  - [ ] Cook recipe
- [ ] Sleep

```

> When the rendered list items are clicked, they will be updated in the pure Markdown:

---

> Git Stripspace:

> - Strips trailing whitespace
> - Collapses newlines
> - Adds newline to end of file

> A file must be passed when calling the command, e.g.:

> `$ git stripspace < README.md`

---

> A Git query allows you to search all your previous commit messages and find the most recent one matching the query.

> `$ git show :/typo`

---