8000 Add links to docs · s30java/github-cheat-sheet@1b5e9c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b5e9c9

Browse files
author
Rafal Chmiel
committed
Add links to docs
1 parent e70c204 commit 1b5e9c9

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i
3838

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

41+
[*Read more about GitHub secrets.*](https://github.com/blog/967-github-secrets)
42+
4143
## Cloning a Repo
4244

4345
When cloning a repo the `.git` can be left off the end.
@@ -46,6 +48,8 @@ When cloning a repo the `.git` can be left off the end.
4648
$ git clone https://github.com/tiimgreen/github-cheat-sheet
4749
```
4850

51+
[*Read more about the Git `clone` command.*](http://git-scm.com/docs/git-clone)
52+
4953
## Hub - Git Wrapper
5054

5155
[Hub](https://github.com/github/hub) is a command line git wrapper that gives extra features and commands that make working with GitHub easier.
@@ -83,12 +87,16 @@ $ git checkout -
8387
# Switched to branch 'master'
8488
```
8589

90+
[*Read more about Git branching.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
91+
8692
## git.io
8793

8894
[git.io](http://git.io) is a simple URL shortener for GitHub.
8995

9096
[http://git.io/wO0xUg](http://git.io/wO0xUg)
9197

98+
[*Read more about Git.io.*](https://github.com/blog/985-git-io-github-url-shortener)
99+
92100
## Gists
93101

94102
[Gists](https://gist.github.com/) are an easy way to work with small bits of code without creating a fully fledged repo.
@@ -100,6 +108,8 @@ $ git clone https://gist.github.com/tiimgreen/10545817
100108

101109
![Gists](http://i.imgur.com/dULZXXo.png)
102110

111+
[*Read more about creating gists.*](https://help.github.com/articles/creating-gists)
112+
103113
## Keyboard Shortcuts
104114

105115
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
116126

117127
To see all of the shortcuts for the current page press `?`.
118128

129+
[*Read more about using the Command Bar.*](https://help.github.com/articles/using-the-command-bar)
130+
119131
## Closing Issues with Commits
120132

121133
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.
128140

129141
![Closing Repo](http://i.imgur.com/URXFprQ.png)
130142

143+
[*Read more about closing issues via commit messages.*](https://help.github.com/articles/closing-issues-via-commit-messages)
144+
131145
## Checking out Pull Requests
132146

133147
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
170184
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
171185
```
172186

187+
[*Read more about checking out pull requests locally.*](https://help.github.com/articles/checking-out-pull-requests-locally)
188+
173189
## Cross-link Issues
174190

175191
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
198214

199215
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).
200216

217+
[*Read more about GitHub Flavored Markdown.*](https://help.github.com/articles/github-flavored-markdown)
218+
201219
## Commit History by Author
202220

203221
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.
206224
https://github.com/rails/rails/commits/master?author=dhh
207225
```
208226

227+
[*Read more about the differences between commits views.*](https://help.github.com/articles/differences-between-commit-views)
228+
209229
## Empty Commits
210230

211231
Commits can be pushed with no code changes by adding `--allow-empty`
@@ -238,6 +258,8 @@ https://github.com/rails/rails/compare/master@{2014-10-04}...master
238258
```
239259
which allows you to see the difference on the master branch up a set time ago or a specified date.
240260

261+
[*Read more about comparing commits across time.*](https://help.github.com/articles/comparing-commits-across-time)
262+
241263
### Compare branches across forked repositories
242264

243265
To use GitHub to compare branches across forked repositories, change the URL to look like this:
@@ -307,6 +329,8 @@ When on a comment thread and you want to quote something someone previously said
307329

308330
![Quick Quote](http://i.imgur.com/TzpMIOA.png)
309331

332+
[*Read more about quick quoting.*](https://github.com/blog/1399-quick-quotes)
333+
310334
## Styled Git Status
311335

312336
```bash
@@ -323,6 +347,8 @@ $ git status -sb
323347

324348
![git status -sb](http://i.imgur.com/xNI1bT0.png)
325349

350+
[*Read more about the Git `status` command.*](http://git-scm.com/docs/git-status)
351+
326352
## Styled Git Log
327353

328354
```bash
@@ -333,6 +359,8 @@ $ git log --all --graph --decorate --oneline --abbrev-commit
333359

334360
NOTE: This can be added into an Alias (shorter command) using the instructions [here](https://github.com/tiimgreen/github-cheat-sheet#aliases)
335361

362+
[*Read more about the Git `log` command.*](http://git-scm.com/docs/git-log)
363+
336364
## Git Query
337365

338366
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
366394

367395
Will give you a list of branches that have not been merged into your current branch.
368396

397+
[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch)
398+
369399
## Quick Licensing
370400

371401
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
378408

379409
Also works for `.gitignore`.
380410

411+
[*Read more about open source licensing.*](https://help.github.com/articles/open-source-licensing)
412+
381413
## TODO Lists
382414

383415
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:
397429
- [ ] Sleep
398430
```
399431

432+
[*Read more about task lists.*](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments)
433+
400434
## Relative Links
401435

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.
403437

404438
```markdown
405439
[Link to a header](#awesome-section)
@@ -410,6 +444,8 @@ When they are clicked, they will be updated in the pure Markdown:
410444
Absolute links have to be updated whenever the URL changes (e.g. repo renamed, username changed, project forked).
411445
Using relative links makes your documentation easily stand on its own.
412446

447+
[*Read more about relative links.*](https://help.github.com/articles/relative-links-in-readmes)
448+
413449
## .gitconfig Recommendations
414450

415451
Your `.gitconfig` is the file that contains all your preferences.
@@ -492,6 +528,8 @@ To add more colour to your git command line:
492528
$ git config --global color.ui 1
493529
```
494530

531+
[*Read more about the Git `config` command.*](http://git-scm.com/docs/git-config)
532+
495533
# Sharing
496534

497535
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

Comments
 (0)
0