You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[*Read more about creating gists.*](https://help.github.com/articles/creating-gists)
112
+
103
113
## Keyboard Shortcuts
104
114
105
115
When on a repo page keyboard shortcuts allow you to navigate easily.
@@ -116,6 +126,8 @@ Pressing `y` __when looking at a file__ (e.g. `https://github.com/tiimgreen/gith
116
126
117
127
To see all of the shortcuts for the current page press `?`.
118
128
129
+
[*Read more about using the Command Bar.*](https://help.github.com/articles/using-the-command-bar)
130
+
119
131
## Closing Issues with Commits
120
132
121
133
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 once it is committed to the master branch.
@@ -128,6 +140,8 @@ This closes the issue and references the closing commit.
128
140
129
141

130
142
143
+
[*Read more about closing issues via commit messages.*](https://help.github.com/articles/closing-issues-via-commit-messages)
144
+
131
145
## Checking out Pull Requests
132
146
133
147
If you want to check out pull request locally, you can fetch it using that command:
@@ -170,6 +184,8 @@ and even fetch them automatically, if you add corresponding lines in your .git/c
[*Read more about checking out pull requests locally.*](https://help.github.com/articles/checking-out-pull-requests-locally)
188
+
173
189
## Cross-link Issues
174
190
175
191
If you want to link to another issue in the same repo, simple type hash `#` then the issue number, it will be auto-linked.
@@ -198,6 +214,8 @@ puts table.to_s
198
214
199
215
GitHub uses [Linguist](https://github.com/github/linguist) to perform language detection and syntax highlighting. You can find out which keywords are valid by perusing the [languages YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml).
200
216
217
+
[*Read more about GitHub Flavored Markdown.*](https://help.github.com/articles/github-flavored-markdown)
218
+
201
219
## Commit History by Author
202
220
203
221
To view all commits on a repo by author add `?author=username` to the URL.
@@ -206,6 +224,8 @@ To view all commits on a repo by author add `?author=username` to the URL.
NOTE: This can be added into an Alias (shorter command) using the instructions [here](https://github.com/tiimgreen/github-cheat-sheet#aliases)
335
361
362
+
[*Read more about the Git `log` command.*](http://git-scm.com/docs/git-log)
363
+
336
364
## Git Query
337
365
338
366
A git query allows you to search all your previous commit messages and finds the most recent one matching the query.
@@ -366,6 +394,8 @@ $ git branch --no-merged
366
394
367
395
Will give you a list of branches that have not been merged into your current branch.
368
396
397
+
[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch)
398
+
369
399
## Quick Licensing
370
400
371
401
When creating a repo GitHub gives you the options of adding in a pre-made license:
@@ -378,6 +408,8 @@ You can also add them to existing repos by creating a new file through the web i
378
408
379
409
Also works for `.gitignore`.
380
410
411
+
[*Read more about open source licensing.*](https://help.github.com/articles/open-source-licensing)
412
+
381
413
## TODO Lists
382
414
383
415
In Issues and Pull requests check boxes can be added with the following syntax (notice the space):
@@ -397,9 +429,11 @@ When they are clicked, they will be updated in the pure Markdown:
397
429
- [ ] Sleep
398
430
```
399
431
432
+
[*Read more about task lists.*](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments)
433
+
400
434
## Relative Links
401
435
402
-
[Relative links](https://help.github.com/articles/relative-links-in-readmes) are recommended in your Markdown files when linking to internal content.
436
+
Relative links are recommended in your Markdown files when linking to internal content.
403
437
404
438
```markdown
405
439
[Link to a header](#awesome-section)
@@ -410,6 +444,8 @@ When they are clicked, they will be updated in the pure Markdown:
410
444
Absolute links have to be updated whenever the URL changes (e.g. repo renamed, username changed, project forked).
411
445
Using relative links makes your documentation easily stand on its own.
412
446
447
+
[*Read more about relative links.*](https://help.github.com/articles/relative-links-in-readmes)
448
+
413
449
## .gitconfig Recommendations
414
450
415
451
Your `.gitconfig` is the file that contains all your preferences.
@@ -492,6 +528,8 @@ To add more colour to your git command line:
492
528
$ git config --global color.ui 1
493
529
```
494
530
531
+
[*Read more about the Git `config` command.*](http://git-scm.com/docs/git-config)
532
+
495
533
# Sharing
496
534
497
535
Share on [Twitter](https://twitter.com/intent/tweet?source=webclient&text=http%3A%2F%2Fgithub.com%2Ftiimgreen%2Fgithub-cheat-sheet%20-%20GitHub%20Cheat%20Sheet)
0 commit comments