2012 update — Git now has a
push.defaultsetting with a default value of "simple". As the name implies, it allows you to
git pushto a repository you cloned following a well-established branch-wise matching convention between local and remotes. It is not limited to the
masterbranch, 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:
Simple enough! Learn more about git aliases.