In Git 1.7.0 and later, you can checkout a new branch:
git checkout -b
Edit files, add and commit. Then push with the -u (short for –set-upstream) option:
git push -u origin
Git will set up the tracking information during the push.
If you are not sharing your repo with others, this is useful to push all your branches to the remote, and –set-upstream tracking correctly for you:
git push –all -u
(Not exactly what the OP was asking for, but this one-liner is pretty popular)
If you are sharing your repo with others this isn’t really good form as you will clog up the repo with all your dodgy experimental branches.