• Stars
    star
    22,524
  • Rank 1,053 (Top 0.03 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 15 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A command-line tool that makes git easier to use with GitHub.

hub is a command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier.

For an official, potentially more user-friendly command-line interface to GitHub, see cli.github.com and this comparison.

This repository and its issue tracker is not for reporting problems with GitHub.com web interface. If you have a problem with GitHub itself, please contact Support.

Usage

$ hub clone rtomayko/tilt
#=> git clone https://github.com/rtomayko/tilt.git

# or, if you prefer the SSH protocol:
$ git config --global hub.protocol ssh
$ hub clone rtomayko/tilt
#=> git clone [email protected]:rtomayko/tilt.git

See usage examples or the full reference documentation to see all available commands and flags.

hub can also be used to make shell scripts that directly interact with the GitHub API.

hub can be safely aliased as git, so you can type $ git <command> in the shell and have it expanded with hub features.

Installation

The hub executable has no dependencies, but since it was designed to wrap git, it's recommended to have at least git 1.7.3 or newer.

platform manager command to run
macOS, Linux Homebrew brew install hub
macOS, Linux Nix nix-env -i hub
Windows Scoop scoop install hub
Windows Chocolatey choco install hub
Fedora Linux DNF sudo dnf install hub
Arch Linux pacman sudo pacman -S hub
FreeBSD pkg(8) pkg install hub
Debian, Ubuntu apt(8) sudo apt install hub
Ubuntu Snap We do not recommend installing the snap anymore.
openSUSE Zypper sudo zypper install hub
Void Linux xbps sudo xbps-install -S hub
Gentoo Portage sudo emerge dev-vcs/hub
any conda conda install -c conda-forge hub

Packages other than Homebrew are community-maintained (thank you!) and they are not guaranteed to match the latest hub release. Check hub version after installing a community package.

Standalone

hub can be easily installed as an executable. Download the latest binary for your system and put it anywhere in your executable path.

GitHub Actions

hub is ready to be used in your GitHub Actions workflows:

steps:
- uses: actions/checkout@v2

- name: List open pull requests
  run: hub pr list
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Note that the default secrets.GITHUB_TOKEN will only work for API operations scoped to the repository that runs this workflow. If you need to interact with other repositories, generate a Personal Access Token with at least the repo scope and add it to your repository secrets.

Source

Prerequisites for building from source are:

Clone this repository and run make install:

git clone \
  --config transfer.fsckobjects=false \
  --config receive.fsckobjects=false \
  --config fetch.fsckobjects=false \
  https://github.com/github/hub.git

cd hub
make install prefix=/usr/local

Aliasing

Some hub features feel best when it's aliased as git. This is not dangerous; your normal git commands will all work. hub merely adds some sugar.

hub alias displays instructions for the current shell. With the -s flag, it outputs a script suitable for eval.

You should place this command in your .bash_profile or other startup script:

eval "$(hub alias -s)"

PowerShell

If you're using PowerShell, you can set an alias for hub by placing the following in your PowerShell profile (usually ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1):

Set-Alias git hub

A simple way to do this is to run the following from the PowerShell prompt:

Add-Content $PROFILE "`nSet-Alias git hub"

Note: You'll need to restart your PowerShell console in order for the changes to be picked up.

If your PowerShell profile doesn't exist, you can create it by running the following:

New-Item -Type file -Force $PROFILE

Shell tab-completion

hub repository contains tab-completion scripts for bash, zsh and fish. These scripts complement existing completion scripts that ship with git.

Meta

More Repositories

1

will_paginate

Pagination library for Rails and other Ruby applications
Ruby
5,706
star
2

git-deploy

git deployment made easy
Ruby
2,098
star
3

dotfiles

bash, zsh, git, tmux, personal toolbox
Shell
1,208
star
4

rfc

Pretty RFC indexes and reformats RFC documents for easier discovery and viewing.
JavaScript
935
star
5

poignant-guide

Why's Poignant Guide to Ruby
HTML
732
star
6

instagram

The first Instagram website and lightweight API HTTP client
Ruby
586
star
7

ssl-tools

Ruby tools to help with debugging certificates for SSL connections
Ruby
339
star
8

contacts

Ruby library for consuming Google, Yahoo!, Flickr and Windows Live contact APIs
Ruby
294
star
9

anyenv

rbenv-inspired version manager that can be configured to manage versions of ANYTHING
Go
273
star
10

vimfiles

vim configuration – Ruby, Rails, Markdown, SCSS, CoffeeScript
Vim Script
266
star
11

hanna

More than just a new RDoc template
Ruby
234
star
12

gh-branch

GitHub CLI extension for fuzzy finding, quickly switching between and deleting branches.
Shell
210
star
13

nibbler

A cute HTML scraper / data extraction tool in under 70 lines of code
Ruby
141
star
14

bump-homebrew-formula-action

Automatically bump Homebrew formula after a release
TypeScript
126
star
15

coral

Hacker's toolbelt for Ruby, gems, Bundler, git, and more
Shell
108
star
16

choices

Easy external settings for your app
Ruby
95
star
17

gorgeous

Convert between different data formats: JSON, XML, YAML, Ruby, email, URL-encoded
Ruby
94
star
18

movieapp

Mark movies you watched, liked, or plan to watch, and share with your friends.
Ruby
79
star
19

diveintohtml5

[STALE] Copy of Mark Pilgrim's book "Dive Into HTML5"
HTML
75
star
20

gh-cp

GitHub CLI extension to copy a file from a GitHub repository locally without cloning the repository.
Shell
72
star
21

issuesync

Downloads all issues for the current project to individual `issues/*.md` files
Ruby
67
star
22

twitter-login

Login through Twitter; DEPRECATED in favor of omniauth-twitter.
Ruby
63
star
23

rspec-rails-mocha

Ports functionality of mock_model and stub_model from rspec-rails for developers using Mocha.
Ruby
57
star
24

hub-api-utils

A collection of `hub api` examples
Shell
57
star
25

bluecloth

Markdown processor in Ruby; foked from official SVN repo to fix bugs
Ruby
49
star
26

faraday-stack

[deprecated] Über Faraday stack for consuming APIs (JSON, XML decoding & more)
Ruby
47
star
27

sinatra-boilerplate

Sinatra + Haml Sass Compass Bourbon CoffeeScript
JavaScript
41
star
28

gh-contrib

GitHub CLI extension to render your contribution graph in the terminal
Shell
39
star
29

explain-ruby

Explains Ruby syntax
Ruby
32
star
30

twin

Twitter's twin; a Rack middleware to expose a Twitter-like API from your app
Ruby
30
star
31

gh-repo-collab

GitHub CLI extension to manage repository collaborators
Shell
28
star
32

user-scripts

User scripts for Greasemonkey/Safari/Fluid; home of Endless Tweets
JavaScript
28
star
33

standardista

A nicotine patch for Rails users who want to stop pretending they're writing XHTML
Ruby
23
star
34

tapas-bar

Tiny webapp that I use for watching RubyTapas from my iPad across home network.
Ruby
20
star
35

polyamory

A tool that knows how to run your tests regardless of framework
Ruby
19
star
36

remark

HTML to Markdown converter
Ruby
18
star
37

gh-delete-repo

[Deprecated] GitHub CLI extension for deleting GitHub repositories
Shell
17
star
38

rbenv-user-gems

[DEPRECATED] rbenv plugin for $GEM_HOME and user gems install location
Shell
15
star
39

go-travis

Go-based CLI tool for Travis CI
Go
15
star
40

shrubbery

Nested lists unlike you've ever seen
JavaScript
14
star
41

thor-tasks

GitHub tasks for Thor
14
star
42

gh-license

GitHub CLI extension to add a license to the current project
Shell
14
star
43

blog

The blog
HTML
14
star
44

itunes

Access iTunes with MacRuby through Scripting Bridge
C
13
star
45

facebook

Facebook login; DEPRECATED in favor of omniauth-facebook.
Ruby
13
star
46

textmate-bundles

My fork of a repo that once was "textmate/bundles"
11
star
47

curly

Easier than Curl::Easy
Ruby
10
star
48

async-upload

Example app for asynchronous file upload via hidden iframe with Prototype and PHP
PHP
9
star
49

rbenv-charles-ssl

rbenv plugin to help installing Charles Proxy SSL certificate into all rubies
Shell
9
star
50

cstags

ctags generator for CoffeeScript files
CoffeeScript
9
star
51

puppet-personal

I'm learning Puppet. WIP
Ruby
8
star
52

mingo

Ruby
8
star
53

asbestos

Render JSON from your XML Builder templates
Ruby
7
star
54

twitter-followers

Mini app that processes new followers notifications from Twitter
JavaScript
7
star
55

svg2png

Convert SVGs to PNG using headless Chrome
JavaScript
6
star
56

gh-repo-topic

[Deprecated] GitHub CLI extension to list or add repository topics
Shell
6
star
57

never-forget

The stupid exception tracker. Saves to MongoDB.
Ruby
6
star
58

Lyndon.tmbundle

Execute JavaScript expressions with a single keystroke inside TextMate
6
star
59

gh-lint-workflow

A GitHub CLI extension to lint GitHub Actions workflow files [EXPERIMENTAL]
Shell
6
star
60

railsgirls-movieapp

Example application for Rails Girls workshop
Ruby
5
star
61

stylish.vim

vim plugin to cycle through available color schemes and fonts on your system
Ruby
4
star
62

goreleaser-test

Shell
3
star
63

gh-notifications

Ruby
3
star
64

go-utils

Go
3
star
65

tweets

Grailbird site that powers an individual Twitter Archive, edited for my needs
JavaScript
3
star
66

gh-label

1
star
67

pages-cname-instructions

How to host GitHub Pages site on your own domain
JavaScript
1
star