Sourced from: http://kernowsoul.com/blog/2012/06/20/4-ways-to-avoid-merge-commits-in-git/
$ # from an individual repo
$ git config branch.master.rebase true
$ # or, set it globally (only works for new repos forward)
$ git config --global branch.autosetuprebase always
If needing to go back and set all branches to rebase by default, run this bash
script.
#!/bin/bash
for d in */ ; do
if [[ -d $d ]]; then
# change directory
pushd "$d" > /dev/null 2>&1
# set it
git config branch.master.rebase true
popd > /dev/null 2>&1
fi
done
echo "Completed."
exit