I spend quite a bit of time in terminal, almost everything I do for the day goes through the terminal and it’s rare that I don’t have a window open in the background somewhere. Granted I haven’t mustered up the courage to utilize VIM or EMAC.

One thing I wasn’t a fan of was the inability to create and push repos in Github from the terminal. Or at least to my knowledge. I recently learned that I could use cURL commands to create repos on Github.

curl -u "$username:$token" https://api.github.com/user/repos -d '{"name":"'$repo_name'"}'

I though, “could I create a script in bash that allows me to push my files without ever firing up chrome?”, so I decided to ask around on stack overflow for direction and embark on this.

I opened a query and the very first response returned something interesting. Someone else had already thought the samething and saved many people the trouble (obviously I wasn’t the first to think of this) of having to built it themselves; thus introducing Hub.

A great little script that has already saved me time (or at least the repetition of having to create a new repo via the browser). Best thing to do is make an alias for hub (and name it git, as hub inherits all of git’s commands).

Hopefully others get some use out of hub. I still think I’m going to create my own script for creating an empty repo just to see if I can get the logic right, will probably be a weekend project.