hub – git with github
This week I released hub, a command line script which adds GitHub knowledge to a few git subcommands. For example, clone: $ hub clone cytzol/cope Initialized empty Git repository in…
This week I released hub, a command line script which adds GitHub
knowledge to a few git
subcommands.
For example, clone
:
$ hub clone cytzol/cope
Initialized empty Git repository in /Users/chris/cope/.git/
remote: Counting objects: 415, done.
... etc ...
Because hub
only adds functionality, it’s safe to alias to git
in
your shell:
$ alias git=hub
$ git clone citizen428/ClojureX
Initialized empty Git repository in /Users/chris/ClojureX/.git/
remote: Counting objects: 89, done.
... etc ...
The simplest way to install it is by pulling down the script and
sticking it in your $PATH
:
curl -s http://defunkt.github.com/hub/standalone > ~/bin/hub && chmod 755 !#:4
For more information, see the README or the man page.
Oh, and here’s the list of enhanced subcommands.
git clone
$ git clone schacon/ticgit
> git clone git://github.com/schacon/ticgit.git
$ git clone -p schacon/ticgit
> git clone git@github.com:schacon/ticgit.git
$ git clone resque
> git clone git://github.com/YOUR_USER/resque.git
$ git clone -p resque
> git clone git@github.com:YOUR_USER/resque.git
git remote add
$ git remote add rtomayko
> git remote add rtomayko git://github.com/rtomayko/CURRENT_REPO.git
$ git remote add -p rtomayko
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
git init
$ git init -g
> git init
> git remote add origin git@github.com:YOUR_USER/REPO.git
git help
$ git help
> (improved git help)
$ git help hub
> (hub man page)
Enjoy, and please contribute!
Update: hub
requires Ruby 1.8.6, 1.8.7 or 1.9.1.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Collaboration-DarkMode-2.png?resize=400%2C212)
2024 is the biggest global election year in history. What’s at stake for developers?
GitHub is considering what is at stake for our users and platform, how we can take responsible action to support free and fair elections, and how developers contribute to resilient democratic processes.
![](https://github.blog/wp-content/uploads/2023/10/AI-DarkMode-2.png?resize=400%2C212)
GitHub named a Leader in the Gartner first-ever Magic Quadrant for AI Code Assistants
This year, as part of its annual Magic Quadrant series, Gartner published a first-of-its-kind report analyzing the state of play in the AI Code Assistants market–and named GitHub a Leader.
![AI in software development 2024 survey results with colorful graphics and percentages.](https://github.blog/wp-content/uploads/2024/08/ai-survey-header.png?resize=400%2C212)
Survey: The AI wave continues to grow on software development teams
We surveyed 2,000 people on software development teams at enterprises in the U.S., Brazil, India, and Germany about the use, experience, and expectations around generative AI tools in software development.