
Git-hub – Do GitHub operations from the git command - luu
https://github.com/ingydotnet/git-hub
======
TheHippo
Why should I favor this over Github's hub?

[https://github.com/github/hub](https://github.com/github/hub)

~~~
jessedhillon
> hub is best aliased as git, so you can type $ git <command>

I'd rather have a git subcommand to interface with github. The way hub works
is to alias over git and make it do github things by default. That seems like
an obviously wrong way to do it.

~~~
jschwartzi
You could probably wrap it with another BASH script named git that looks for
hub as $1, otherwise it passes its args directly into the git command. I
haven't quite worked out how $PATH resolution would work in that scheme
though.

~~~
jessedhillon
Git already works like this. If you attempt `git foo`, your $PATH will be
consulted for an executable with the name `git-foo`, and if found, it will be
called with the rest of the arguments. That's why this command is `git-hub`
and is invoked with `git hub`.

------
azdle
Wow, it's all written in bash. This has to be the biggest bash program (?)
I've ever seen.

~~~
anonova
I think rvm [1] still holds that record for me.

[1]: [https://github.com/rvm/rvm](https://github.com/rvm/rvm)

~~~
rylee
Wait... rvm is pure bash?

Oh dear god. That's honestly terrifying. I've never bothered looking at it.

~~~
bdcravens
There was a crowd-sourcing campaign to re-write 2.0 in Ruby:

[https://www.bountysource.com/teams/rvm/fundraiser](https://www.bountysource.com/teams/rvm/fundraiser)

However, I haven't heard anything of it in a while.

~~~
accatyyc
That sound pretty crazy. The reason to use RVM is to be able to run Ruby
programs with different Ruby versions... How would you run it in the first
time if you have the wrong versions?

I guess bash is a good choice since it can be run pretty much everywhere.

------
skatenerd
How many people do you know who think that Git and GitHub are the same thing?

~~~
accatyyc
Quite a few. Especially our designers/people that doesn't commit/use git very
much but still have to use it, have a hard time grasping the difference. The
git client they're using being called "GitHub" doesn't make it any easier!

------
rcthompson
This is great. I was just looking for a way to merge pull requests from the
command line today. (By which I mean fetch the branch into my local repo and
perform the merge with git, not just having a bash script to press the merge
button on Github.)

~~~
accatyyc
I hope this is very ironic (?)

 _edit_ removed unnecessary comment. What I mean is that you can already do
this with git, nothing else required.

git remote add fork fork@github.com && git merge fork/pr-branch

~~~
gbtxg
Well actually you can do it without even adding a remote.

    
    
       git pull https://github.com/otheruser/repo.git branchname
    

so your example will become

    
    
        git pull fork@github.com pr-branch

~~~
rcthompson
Yeah, I want to do it without adding a remote for every person who sends a
pull request. I presume this is git with the "hub" wrapper provided by github?

Oh, and I know I can pull directly from the appropriate URL, but I still have
to browse to the pull request to get the URL for the associated branch. At
that point I may as well just hit the merge button while I'm there.

------
fibo
I was really lucky I could met Ingy at a Perl conference. He is a really kind
person and a mighty coder. He wrote also many other creative pieces of
software, very powerful stuff like IO::All.

Ah, and he is the creator of YAML! Big respect!

------
ChristianBundy
[https://github.com/ingydotnet/git-
hub/issues/160](https://github.com/ingydotnet/git-hub/issues/160)

~~~
psophis
GitHub's hub is a wrapper for the git command. This adds a subcommand.

