Awesome Tips about Github


Shortcuts

  • Type ? to check keyboard shortcuts.

    s or /Focus the search bar
    g nGo to your notifications
    g pGo to the Pull requests tab at Repositories
    g wGo to the Wiki tab
    tActivates the file finder or Open the list of changed files in the pull request
    wSwitch to a new branch or tag
    lJump to a line in your code
Excluded URLs and keys in Chrome Vimium
  • Some shortcuts from Github conflicts with Chrome Vimium
  • So add the following at Excluded URLs and keys at Vimium Options.

    PatternsKeys
    https?://github.com/*b,l,c,g,n,h,p

Search Syntax

  • filename:FILENAME
  • in:file, in:path
  • key_word in:file,path matches code where “key_word” appears in the file contents or the file path.
  • Search by file location
    • path:/, path:DIRECTORY, path:PATH/TO/DIRECTORY
  • extension: EXTENSION
  • user:the_user, repo:the_repo
  • fork:true/false/only

Wide Github

  • Install Tampermonkey first.
  • Add @include *github.your_company.com* at Installed userscripts -> Wide Github -> Editor to make it work with GitHub Enterprise.

Chrome Extensions

  • Octotree
    • Easy-to-navigate code tree, just like in IDEs
  • GitZip for github
    • It can make the sub-directories and files of github repository as zip and download it; You DO NOT have to download the whole project just for those few files/dirs you need.
  • Enhanced GitHub

Expand outdated Github Comments


Hackable Github URLs

  • Compare changes between tags/branches
    • https://github.com/{username}/{repo}/compare/{older-tag}…{newer-tag}
    • compare/master@{2weeks}…master
    • compare/{older-tag}…{newer-tag}
  • URL to create a pull request between different two branches
    • /compare/remote:branch…remote:branch
  • issues to track all issue
  • pulls to track all prs

Use Github to Host Files and Share Online

Github Pages

Markdown


Awesome Tips about Markdown


Misc

  • Use Gist to host code
  • Pin repos
  • Emoji in github
    • 👍, 👍, 🐛
  • Saved replies
  • Check whether project is still alive?
    • Check history of commit, release and contributors at Code tab.
    • Check Insights tab: how many contributors, code frequency, commits history etc.
    • Check issues tab: check the closed issues, how they are closed: some may be closed without any reply or auto closed.
    • For example emmet-atom looks like not maintained any more. <!– https://github.com/zhaoolee/ChineseBQB

–>


Labels

adsense (5) Algorithm (69) Algorithm Series (35) Android (7) ANT (6) bat (8) Big Data (7) Blogger (14) Bugs (6) Cache (5) Chrome (19) Code Example (29) Code Quality (7) Coding Skills (5) Database (7) Debug (16) Design (5) Dev Tips (63) Eclipse (32) Git (5) Google (33) Guava (7) How to (9) Http Client (8) IDE (7) Interview (88) J2EE (13) J2SE (49) Java (186) JavaScript (27) JSON (7) Learning code (9) Lesson Learned (6) Linux (26) Lucene-Solr (112) Mac (10) Maven (8) Network (9) Nutch2 (18) Performance (9) PowerShell (11) Problem Solving (11) Programmer Skills (6) regex (5) Scala (6) Security (9) Soft Skills (38) Spring (22) System Design (11) Testing (7) Text Mining (14) Tips (17) Tools (24) Troubleshooting (29) UIMA (9) Web Development (19) Windows (21) xml (5)