If you used bzr/cvs/svn checkouts and want something similar then in the repository root do:
git clone git://git.drupal.org/myproject.git
cd myproject
git config branch.autosetuprebase always
git config push.default current
git config branch.$(git symbolic-ref HEAD | cut -c 12-).rebase true
echo 'git push' > .git/hooks/post-commit
chmod 755 .git/hooks/post-commit
After this (on at least on Linux and Mac OS X)
- Contents will be pushed after every commit
- new branches will rebase after every pull.
- The only existing branch (master but can be something else with for example
git clone --branch 6.x-1.x
use the instruction on the Git instructions page of your project for this step) will rebase after every pull.
It does not abort commits if the local repo is behind remote, however. I would love to see tips on how to do that.