articlesabout

A Git Hub shortcut

2012 update — Git now has a push.default setting with a default value of "simple". As the name implies, it allows you to git push to a repository you cloned following a well-established branch-wise matching convention between local and remotes. It is not limited to the master branch, and is usually a sane strategy when dealing with a GitHub remote.

You are using GitHub and a lot of master remote branches. Of course you are… And you are tired of ever writing:

git push origin master

Why not trying an alias?

git config --global alias.hub "push origin master"

Now, you can push to master in a semantic way:

git hub

Simple enough! Learn more about git aliases.

Mar 25, 20101 min readSummary: A CLI shortcut to push to GitHub in no time.