Created
December 18, 2019 18:45
-
-
Save mptrs/ac960ad5a7717c841d9520ee44e7d5f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Git & Github secrets | |
##Github | |
Add `.diff` or `.patch` behind any commit url and get the diff/patch as text. | |
Example `/commit/4feca95ff047e2648fa8cfed516221a1b2cad3e9.diff` | |
Add `?w=1` to any diff url to truncate the unnecessary white-space. | |
`t` when on a repo page and type the name of a file to find it.<br> | |
`w` for quick brach select.<br> | |
`s` for quick search.<br> | |
`?` for all the commands of that page. | |
In the read me specify the code language and get nice code highlighting. | |
```ruby | |
require 'something' | |
markdown = Something.new("Hello World") | |
puts markdown.to_html | |
``` | |
`:EMOJI:` to add some emotion to your commits [emoji] | |
Click a line(number) to highlight it and add it to the URL to share. To make a range add a `-` and the end line(number). | |
[emoji]:http://emoji-cheat-sheet.com | |
##Git | |
`git show :/query` to search commits for something. Replace query of course with what you're looking for. | |
Git auto correct if you suck at typing like me: `git config --global help.autocorrect 1` | |
Colours are fun so put them on: `git config --global colour.ui 1` | |
`git-amend` | |
`git commit --amend -C HEAD` to add stuff to the latest commit | |
More [here] | |
[here]:http://confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment