mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-09 09:26:42 +02:00
Merge branch 'master' into korean
This commit is contained in:
52
README.md
52
README.md
@@ -9,7 +9,7 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i
|
||||
- [Hub - Git Wrapper](#hub---git-wrapper)
|
||||
- [Decreasing Contributor Friction](#decreasing-contributor-friction)
|
||||
- [Previous Branch](#previous-branch)
|
||||
- [git.io](#gitio)
|
||||
- [Git.io](#gitio)
|
||||
- [Gists](#gists)
|
||||
- [Keyboard Shortcuts](#keyboard-shortcuts)
|
||||
- [Closing Issues with Commits](#closing-issues-with-commits)
|
||||
@@ -21,6 +21,10 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i
|
||||
- [Comparing Branches](#comparing-branches)
|
||||
- [Line Highlighting in Repos](#line-highlighting-in-repos)
|
||||
- [Metadata and Plugin Support for GitHub Pages](#metadata-and-plugin-support-for-github-pages)
|
||||
- [Diffs](#diffs)
|
||||
- [Rendered Prose Diffs](#rendered-prose-diffs)
|
||||
- [Diffable Maps](#diffable-maps)
|
||||
- [Expanding Context in Diffs](#expanding-context-in-diffs)
|
||||
- [Emojis](#emojis)
|
||||
- [Images/GIFs](#imagesgifs)
|
||||
- [Quick Quoting](#quick-quoting)
|
||||
@@ -31,7 +35,7 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i
|
||||
- [Quick Licensing](#quick-licensing)
|
||||
- [Task Lists](#task-lists)
|
||||
- [Relative Links](#relative-links)
|
||||
- [.gitconfig Recommendations](#gitconfig-recommendations)
|
||||
- [`.gitconfig` Recommendations](#gitconfig-recommendations)
|
||||
- [Aliases](#aliases)
|
||||
- [Auto-correct](#auto-correct)
|
||||
- [Color](#color)
|
||||
@@ -73,7 +77,7 @@ $ git clone https://github.com/tiimgreen/toc.git
|
||||
## Decreasing Contributor Friction
|
||||
If you want people to use and contribute to your project, you need to start by answering their most basic questions. What does the project do? How do I use it? How am I allowed to use it? How do I contribute? How do I get up and running in development? How do I make sure my new features didn't break old functionality?
|
||||
|
||||
[Friction](https://github.com/rafalchmiel/friction) is a command line script that will check your project for common answers to these questions. This is some example output:
|
||||
[Friction](https://github.com/rafalchmiel/friction) is a command line script that will check your project for common [answers to these questions](https://github.com/rafalchmiel/friction/wiki). This is some example output:
|
||||
|
||||
[](https://github.com/rafalchmiel/friction)
|
||||
|
||||
@@ -100,11 +104,19 @@ $ git checkout -
|
||||
|
||||
[*Read more about Git branching.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
|
||||
|
||||
## git.io
|
||||
## Git.io
|
||||
|
||||
[git.io](http://git.io) is a simple URL shortener for GitHub.
|
||||
[Git.io](http://git.io) is a simple URL shortener for GitHub. You can also use it via pure HTTP using Curl:
|
||||
|
||||
[http://git.io/wO0xUg](http://git.io/wO0xUg)
|
||||
```bash
|
||||
$ curl -i http://git.io -F "url=https://github.com/..."
|
||||
HTTP/1.1 201 Created
|
||||
Location: http://git.io/abc123
|
||||
|
||||
$ curl -i http://git.io/abc123
|
||||
HTTP/1.1 302 Found
|
||||
Location: https://github.com/...
|
||||
```
|
||||
|
||||
[*Read more about Git.io.*](https://github.com/blog/985-git-io-github-url-shortener)
|
||||
|
||||
@@ -197,12 +209,14 @@ 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)
|
||||
|
||||
## Cross-link Issues
|
||||
## Cross-Link Issues
|
||||
|
||||
If you want to link to another issue in the same repo, simple type hash `#` then the issue number, it will be auto-linked.
|
||||
|
||||
To link to an issue in another repo, `user_name/repo_name#ISSUE_NUMBER` e.g. `tiimgreen/toc#12`.
|
||||
|
||||

|
||||
|
||||
## Syntax Highlighting in Markdown Files
|
||||
|
||||
For example, to syntax highlight Ruby code in your Markdown files write:
|
||||
@@ -303,6 +317,28 @@ The Jemoji and jekyll-mentions plugins enable [emoji](#emojis) and [@mentions](h
|
||||
|
||||
[*Read more about repository metadata and plugin support for GitHub Pages.*](Repository metadata and plugin support for GitHub Pages)
|
||||
|
||||
## Diffs
|
||||
### Rendered Prose Diffs
|
||||
Commits and pull requests including prose files feature *source* and *rendered* views. Click the "rendered" button to see the changes as they'll appear in the rendered document. Rendered prose view is handy when you're adding, removing, and editing text:
|
||||
|
||||

|
||||
|
||||
[*Read more about rendered prose diffs.*](https://github.com/blog/1784-rendered-prose-diffs)
|
||||
|
||||
### Diffable Maps
|
||||
Any time you view a commit or pull request on GitHub that includes geodata, GitHub will render a visual representation of what was changed.
|
||||
|
||||
[](https://github.com/benbalter/congressional-districts/commit/2233c76ca5bb059582d796f053775d8859198ec5)
|
||||
|
||||
[*Read more about diffable maps.*](https://github.com/blog/1772-diffable-more-customizable-maps)
|
||||
|
||||
### Expanding Context in Diffs
|
||||
Using the *unfold* button in the gutter of a diff, you can reveal additional lines of context with a click. You can keep clicking *unfold* until you've revealed the whole file, and the feature is available anywhere GitHub renders diffs.
|
||||
|
||||

|
||||
|
||||
[*Read more about expanding context in diffs.*](https://github.com/blog/1705-expanding-context-in-diffs)
|
||||
|
||||
## Emojis
|
||||
|
||||
Emojis can be generated on Pull Requests, Issues, Commit Messages, READMEs, etc. using `:name_of_emoji:`
|
||||
@@ -464,7 +500,7 @@ Using relative links makes your documentation easily stand on its own.
|
||||
|
||||
[*Read more about relative links.*](https://help.github.com/articles/relative-links-in-readmes)
|
||||
|
||||
## .gitconfig Recommendations
|
||||
## `.gitconfig` Recommendations
|
||||
|
||||
Your `.gitconfig` is the file that contains all your preferences.
|
||||
|
||||
|
Reference in New Issue
Block a user