mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-11 18:34:00 +02:00
Merge branch 'master' into korean
This commit is contained in:
14
README.md
14
README.md
@@ -4,6 +4,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
|
||||
## Table of Contents
|
||||
- [GitHub](#github)
|
||||
- [Ignore Whitespace](#ignore-whitespace)
|
||||
- [Adjust Tab Space](#adjust-tab-space)
|
||||
- [Commit History by Author](#commit-history-by-author)
|
||||
- [Cloning a Repository](#cloning-a-repository)
|
||||
- [Comparing Branches](#comparing-branches)
|
||||
@@ -61,6 +62,17 @@ Adding `?w=1` to any diff URL will remove any changes only in whitespace, enabli
|
||||
|
||||
[*Read more about GitHub secrets.*](https://github.com/blog/967-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](https://github.com/pengwynn/flint/blob/master/flint/flint.go) adding `?ts=4`:
|
||||
|
||||

|
||||
|
||||
...and this is [after](https://github.com/pengwynn/flint/blob/master/flint/flint.go?ts=4) adding `?ts=4`:
|
||||
|
||||

|
||||
|
||||
### Commit History by Author
|
||||
To view all commits on a repo by author add `?author=username` to the URL.
|
||||
|
||||
@@ -594,7 +606,7 @@ A Git query allows you to search all your previous commit messages and find the
|
||||
$ git show :/query
|
||||
```
|
||||
|
||||
Where `query` is the term you want to search, this then finds the last one and gives details on the lines that were changed.
|
||||
Where `query` (case-sensitive) is the term you want to search, this then finds the last one and gives details on the lines that were changed.
|
||||
|
||||
```bash
|
||||
$ git show :/typo
|
||||
|
Reference in New Issue
Block a user