2012 update — Git now has a
push.default
setting with a default value of "simple". As the name implies, it allows you togit push
to a repository you cloned following a well-established branch-wise matching convention between local and remotes. It is not limited to themaster
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
git push origin master
Why not trying an alias?
git config --global alias.hub "push origin master"
git config --global alias.hub "push origin master"
Now, you can push to master
in a semantic way:
git hub
git hub
Simple enough! Learn more about git aliases.