https://help.github.com/en/articles/pinning-items-to-your-profile
https://stackoverflow.com/questions/20422279/github-pages-are-not-updating
https://help.github.com/en/articles/troubleshooting-github-pages-builds
https://github.com/blog/1901-managing-issues-and-pull-requests-across-repositories
https://github.com/pulls
https://help.github.com/articles/using-keyboard-shortcuts/
https://help.github.com/enterprise/2.8/user/articles/about-pull-request-reviews/
https://stackoverflow.com/questions/20422279/github-pages-are-not-updating
https://help.github.com/en/articles/troubleshooting-github-pages-builds
https://github.com/blog/1901-managing-issues-and-pull-requests-across-repositories
https://github.com/pulls
Use them to quickly find issues you've created. Or pull requests that mention your username. Or issues that have been assigned to you. Or go ahead and use any of our custom advanced search filters and create your own often-used search... the sky's the limit.
t | Activates the file finder |
l | Jump to a line in your code |
w | Switch to a new branch or tag |
y | Expand a URL to its canonical form |
i | Show or hide comments on diffs |
b | Open blame view |
https://help.github.com/enterprise/2.8/user/articles/about-pull-request-reviews/
- Comment: Submit general feedback without explicitly approving the changes or requesting additional changes.
- Approve: Submit feedback and approve merging the changes proposed in the pull request.
- Request changes: Submit feedback that must be addressed before the pull request can be merged.
The in qualifier limits what fields are searched. With this qualifier, you can restrict your search to the source code, the file path, or both. Without the qualifier, only the file contents are searched.
- octocat in:file
- Matches code where "octocat" appears in the file contents.
- octocat in:path
- Matches code where "octocat" appears in the path name.
- octocat in:file,path
- Matches code where "octocat" appears in the file contents or the path name.
- display language:scss
- Matches code with the word "display," that's marked as being SCSS.
Search by the source code file size
The size qualifier filters results based on the size of the file in which the code is found. For example:
Search by the location of a file within the repository
By including the path qualifier, you specify that resulting source code must appear at a specific location in a repository. Subfolders are considered during the search, so be as specific as possible. For example:
- console path:app/public language:javascript
- Finds JavaScript files with the word "console" in an app/public directory (even if they reside in app/public/js/form-validators).
- form path:cgi-bin language:perl
- Finds Perl files under cgi-bin with the word "form" in them.
Search by filename
You can use the filename qualifier if there's a specific file you're looking for. For example:
- filename:.vimrc commands
- Finds *.vimrc* files with the word "commands" in them.
- minitest filename:test_helper path:test language:ruby
- Finds Ruby files containing the word "minitest" named *test_helper* within the *test* directory.
Search by the file extension
The extension qualifier matches code files with a certain extension. For example:
- form path:cgi-bin extension:pm
- Matches code with the word "form," under cgi-bin, with the .pm extension.
- icon size:>200000 extension:css
- Finds files larger than 200 KB that end in .css and have the word "icon" in them.
Search within a user's or organization's repositories
To grab a list of code from all repositories owned by a certain user or organization, you can use theuser syntax. For getting a list of code from a specific repository, you can use the repo syntax. For example:
- user:github extension:rb
- Matches code from GitHub that ends in .rb.
- repo:mozilla/shumway extension:as
- Matches code from @mozilla's shumway project that ends in .as.
Search
https://help.github.com/articles/search-syntax/
Exclude results containing a certain word
You can also narrow your search results by excluding words with the NOT syntax. Searching for Hello returns a massive number of "Hello World" projects, but changing your search to include hello NOT world returns fewer results.
The NOT operator can only be used for string keywords. It does not work for numerals or dates.
Filter qualifiers based on exclusion
Another way you can narrow down search results is to exclude certain subsets. Prefixing any search qualifier with a - excludes all results that are matched by that qualifier.
cats stars:>10 -language:javascript
mentions:defunkt -user:github
https://help.github.com/articles/searching-code/
console path:app/public language:javascript
Search by filename
You can use the filename qualifier if there's a specific file you're looking for. For example:
filename:.vimrc commands
Search by the file extension
The extension qualifier matches code files with a certain extension. For example:
form path:cgi-bin extension:pm
Search within a user's or organization's repositories
To grab a list of code from all repositories owned by a certain user or organization, you can use the user syntax. For getting a list of code from a specific repository, you can use the repo syntax. For example:
user:github extension:rb
repo:mozilla/shumway extension:as
http://stackoverflow.com/questions/22411063/searching-for-on-github
http://stackoverflow.com/questions/26433561/how-to-search-on-github-to-get-exact-matches-like-what-quotes-do-for-google
http://usersnap.com/blog/github-hacks-productivity/
https://github.com/tiimgreen/github-cheat-sheet
Syntax Highlighting in Markdown Files
https://help.github.com/articles/closing-a-pull-request/
https://help.github.com/articles/search-syntax/
Exclude results containing a certain word
You can also narrow your search results by excluding words with the NOT syntax. Searching for Hello returns a massive number of "Hello World" projects, but changing your search to include hello NOT world returns fewer results.
The NOT operator can only be used for string keywords. It does not work for numerals or dates.
Filter qualifiers based on exclusion
Another way you can narrow down search results is to exclude certain subsets. Prefixing any search qualifier with a - excludes all results that are matched by that qualifier.
cats stars:>10 -language:javascript
mentions:defunkt -user:github
https://help.github.com/articles/searching-code/
- You can't use the following wildcard characters as part of your search query:
. , : ; / \ ` ' " = * ! ? # $ & + ^ | ~ < > ( ) { } [ ]
. The search will simply ignore these symbols.
console path:app/public language:javascript
Search by filename
You can use the filename qualifier if there's a specific file you're looking for. For example:
filename:.vimrc commands
Search by the file extension
The extension qualifier matches code files with a certain extension. For example:
form path:cgi-bin extension:pm
Search within a user's or organization's repositories
To grab a list of code from all repositories owned by a certain user or organization, you can use the user syntax. For getting a list of code from a specific repository, you can use the repo syntax. For example:
user:github extension:rb
repo:mozilla/shumway extension:as
http://stackoverflow.com/questions/22411063/searching-for-on-github
GitHub search is based on elasticsearch, which has reserved characters than you can escape.
'
>
' and '<
' are optional operators used for intervals, and it doesn't seem for that character to be escaped (in the way GitHub is using or has configured ealasticsearch)."filter class" in:file filename:logback.xml
To enable exact matches with quotes you need to follow your search with the "in:file" modifier. The matches are not quite exact, the word "class" will have to follow the word "filter", but it seems there can be 0 or more spaces or symbols characters between the two words.
- Assuming that people who have a huge follower base on GitHub are worth to follow, I’d recommend to search for users with more than 1.000 followers: https://github.com/search?o=desc&q=followers%3A%3E1000&ref=searchresults&s=followers&type=Users
- You can modify your search regarding specific languages:
- Search for repositories which have been starred a great number of times:https://github.com/search?o=desc&q=stars%3A%3E1000&ref=searchresults&s=stars&type=Repositories
I’m not sure why they named this awesome feature “blame”. But despite it’s name, git blame is pretty cool. It’s an super easy way to display changes of any file. Simply click on the blame button in the code view in order to get an overview on all changes which have been made.
Send line links
Did you know that you share links to a certain code line (or multiple lines)? Simply select the line in the code view and you’ll see how the URL will change. You can even select multiple lines by pressing “SHIFT”.
Get more out of GitHub Issues with Usersnap
Another great thing about GitHub is it’s integration possibilities with other awesome services. I therefore recommend to take a look at github.com/integrations and check out the available integration possibilities with tools (you might be already using).
By connecting Usersnap with GitHub Issues you can make your bug reporting and testing efforts much more pleasant. Screenshots created by your colleagues, testers, website visitors or clients are automatically (or manually if you want) sent to your GitHub Issues.
https://github.com/AntBranch/awesome-githubhttps://github.com/tiimgreen/github-cheat-sheet
Syntax Highlighting in Markdown Files
For example, to syntax highlight Ruby code in your Markdown files write:
```ruby
require 'tabbit'
table = Tabbit.new('Name', 'Email')
table.add_row('Tim Green', 'tiimgreen@gmail.com')
puts table.to_s
```
Read more about GitHub Flavored Markdown.
Emojis can be added to Pull Requests, Issues, commit messages, repository descriptions, etc. using
:name_of_emoji:
.
The full list of supported Emojis on GitHub can be found at emoji-cheat-sheet.com or scotch-io/All-Github-Emoji-Icons. A handy emoji search engine can be found at emoji.muan.co.
The top 5 used Emojis on GitHub are:
:shipit:
:sparkles:
:-1:
:+1:
:clap:
Images and GIFs can be added to comments, READMEs etc.:
![Alt Text](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif)
Raw images from the repo can be used by calling them directly.:
![Alt Text](https://github.com/{user}/{repo}/raw/master/path/to/image.gif)
Task Lists
In Issues and Pull requests check boxes can be added with the following syntax (notice the space):
- [ ] Be awesome
- [ ] Prepare dinner
- [ ] Research recipe
- [ ] Buy ingredients
- [ ] Cook recipe
- [ ] Sleep
Revert a Pull Request
After a pull request is merged, you may find it does not help anything or it was a bad decision to merge the pull request.
You can revert it by clicking the Revert button on the right side of a commit in the pull request page to create a pull request with reverted changes to this specific pull request.
You may choose to close a pull request without merging it into the upstream branch. This can be handy if the changes proposed in the branch are no longer needed, or if another solution has been proposed in another branch.
https://gist.github.com/peterflynn/5980273#file-bookmarklet-js
Show outdated comments:
$(".outdated-diff-comment-container").addClass("open");
https://github.com/stefanbuck/awesome-browser-extensions-for-github
GitHub Highlight Selected
https://chrome.google.com/webstore/detail/github-highlight-selected/lhiklbgjcblimmjjflobpncgihagcmbj/related
https://github.com/blog/967-github-secrets
https://github.com/tiimgreen/github-cheat-sheet
Ignore Whitespace
Adding ?w=1 to any diff URL will remove any changes only in whitespace, enabling you to see only that code that has changed.
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.
Commit History by Author
To view all commits on a repo by author add ?author={user} to the URL.
https://github.com/rails/rails/commits/master?author=dhh
Comparing Branches
To use GitHub to compare branches, change the URL to look like this:
https://github.com/{user}/{repo}/compare/{range}
Where {range} = master...4-1-stable
https://github.com/rails/rails/compare/master...4-1-stable
https://github.com/rails/rails/compare/master@{1.day.ago}...master
https://github.com/rails/rails/compare/master@{2014-10-04}...master
Dates are in the format YYYY-MM-DD
Pressing t will bring up a file explorer.
Pressing w will bring up the branch selector.
Pressing s will focus the search field for the current repository. Pressing Backspace to delete the “This repository” pill changes the field to search all of GitHub.
Pressing l will edit labels on existing Issues.
Pressing y when looking at a file (e.g. https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md) will change your URL to one which, in effect, freezes the page you are looking at. If this code changes, you will still be able to see what you saw at that current time.
Line Highlighting in Repositories
https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60
Closing Issues via Commit Messages
If a particular commit fixes an issue, any of the keywords fix/fixes/fixed, close/closes/closed or resolve/resolves/resolved, followed by the issue number, will close the issue once it is committed to the master branch.
$ git commit -m "Fix screwup, fixes #12"
如何用Github去管理你的Idea
http://zhuanlan.zhihu.com/phodal/20442311
Github装逼指南——Travis CI 和 Codecov
Show outdated comments:
$(".outdated-diff-comment-container").addClass("open");
https://github.com/stefanbuck/awesome-browser-extensions-for-github
GitHub Highlight Selected
https://chrome.google.com/webstore/detail/github-highlight-selected/lhiklbgjcblimmjjflobpncgihagcmbj/related
https://github.com/blog/967-github-secrets
w & t
Navigate your project quickly. On your repository's home page, type w to quickly bring up a quick filter panel for your branches. Inside of your repository, type t to jump into a quick file selector. Select your file, hit enter, and you're gold. There's also a slew of other shortcut keys you can use, depending on the page- just hit ? to see them.
Ignore Whitespace
Adding ?w=1 to any diff URL will remove any changes only in whitespace, enabling you to see only that code that has changed.
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.
Commit History by Author
To view all commits on a repo by author add ?author={user} to the URL.
https://github.com/rails/rails/commits/master?author=dhh
Comparing Branches
To use GitHub to compare branches, change the URL to look like this:
https://github.com/{user}/{repo}/compare/{range}
Where {range} = master...4-1-stable
https://github.com/rails/rails/compare/master...4-1-stable
https://github.com/rails/rails/compare/master@{1.day.ago}...master
https://github.com/rails/rails/compare/master@{2014-10-04}...master
Dates are in the format YYYY-MM-DD
Pressing t will bring up a file explorer.
Pressing w will bring up the branch selector.
Pressing s will focus the search field for the current repository. Pressing Backspace to delete the “This repository” pill changes the field to search all of GitHub.
Pressing l will edit labels on existing Issues.
Pressing y when looking at a file (e.g. https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md) will change your URL to one which, in effect, freezes the page you are looking at. If this code changes, you will still be able to see what you saw at that current time.
Line Highlighting in Repositories
https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60
Closing Issues via Commit Messages
If a particular commit fixes an issue, any of the keywords fix/fixes/fixed, close/closes/closed or resolve/resolves/resolved, followed by the issue number, will close the issue once it is committed to the master branch.
$ git commit -m "Fix screwup, fixes #12"
如何用Github去管理你的Idea
http://zhuanlan.zhihu.com/phodal/20442311
Github装逼指南——Travis CI 和 Codecov