Project page is available at http://github.com/github/hub.
Docs https://hub.github.com/hub.1.html.
My personal favs are:
- Issue creation
- PR creation
- Forking for quick contributions
Let's do a quick fork of a stevemao/left-pad repo.
hub clone stevemao/left-padcd left-padhub fork
Now we can add just a random file, push it and see if it works.
Pro tip, you could use hub browse to open it from CLI.
Could be simplified down to a single command, see Automation Opportunities.
mkdir foocd foohub inithub create -d "My repository description" [-p]
You can view it with hub browse.
hub issue create or ois
Problems?
- Files drag and drop - it's better to do that directly in GH.
hub pull-request create- How to abort PR?
hub pull-request create --pushoropr --push
How about PRs with base other than master?
opr --push -b <baseBranch> -l "bug,help wanted"
How about emojis in issues? See CKE5 issue template
Forking in a single command could be further simplified with some Bash ugliness:
gh-fork() {
hub clone "$1"
cd "${1##*/}"
hub fork
}Yes, it takes longer than 2hrs to get everything going. But from there, creating issues is just a breeze.
For me it was mainly about:
- Setting up VSCode to be a default editor.
- Adding aliases like
ois,cis,opr,cpr.
core.commentChar- by default it's set to#(unfortunately emoji won't work 😁).- Remember about key management (pageant on Windows), otherwise you'll have to type your pass all over the place.