Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/hubPublic

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

License

NotificationsYou must be signed in to change notification settings

mislav/hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hub is a command line tool that wrapsgit in order to extend it with extrafeatures and commands that make working with GitHub easier.

For an official, potentially more user-friendly command-line interface to GitHub,seecli.github.com andthis comparison.

This repository and its issue tracker isnot for reporting problems withGitHub.com web interface. If you have a problem with GitHub itself, pleasecontact 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 git@github.com:rtomayko/tilt.git

Seeusage examples or thefull referencedocumentation to see all available commandsand flags.

hub can also be used to make shell scripts thatdirectly interact with theGitHub API.

hub can be safelyaliased asgit, so you can type$ git <command> in the shell and have it expanded withhub features.

Installation

Thehub executable has no dependencies, but since it was designed to wrapgit, it's recommended to have at leastgit 1.7.3 or newer.

platformmanagercommand to run
macOS, LinuxHomebrewbrew install hub
macOS, LinuxNixnix-env -i hub
WindowsScoopscoop install hub
WindowsChocolateychoco install hub
Fedora LinuxDNFsudo dnf install hub
Arch Linuxpacmansudo pacman -S hub
FreeBSDpkg(8)pkg install hub
Debian, Ubuntuapt(8)sudo apt install hub
UbuntuSnapWe do not recommend installing the snap anymore.
openSUSEZyppersudo zypper install hub
Void Linuxxbpssudo xbps-install -S hub
GentooPortagesudo emerge dev-vcs/hub
anycondaconda install -c conda-forge hub

Packages other than Homebrew are community-maintained (thank you!) and theyare not guaranteed to match thelatest hub release. Checkhub version after installing a community package.

Standalone

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

GitHub Actions

hub is ready to be used in yourGitHub Actions workflows:

steps:-uses:actions/checkout@v2-name:List open pull requestsrun:hub pr listenv:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}

Note that the defaultsecrets.GITHUB_TOKEN will only work for API operationsscoped to the repository that runs this workflow. If you need to interact with otherrepositories,generate a Personal Access Token with at least therepo scopeand add it to yourrepository secrets.

Source

Prerequisites for building from source are:

Clone this repository and runmake install:

git clone \  --config transfer.fsckobjects=false \  --config receive.fsckobjects=false \  --config fetch.fsckobjects=false \  https://github.com/github/hub.gitcd hubmake install prefix=/usr/local

Aliasing

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

hub alias displays instructions for the current shell. With the-s flag, itoutputs a script suitable foreval.

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

eval"$(hubalias -s)"

PowerShell

If you're using PowerShell, you can set an alias forhub by placing thefollowing 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 containstab-completion scripts for bash, zsh and fish.These scripts complement existing completion scripts that ship with git.

Meta


[8]ページ先頭

©2009-2025 Movatter.jp