On my local branch, I have some personal (local-only) changes to a Makefile (just changing the path to the compiler). Obviously I don\'t want to commit those changes in as they
It's probably easier to let git do the rebase autmatically, i.e. create a local branch, configure rebase, add your changes, pull ...
git checkout -b mybranch origin/master
git config branch.mybranch.rebase true
Adapt the Makefile to your needs ...
git add Makefile
git commit -m 'My local-only Makefile.'
From now on git will rebase your changes upon
git pull
Alternatively, (especially if rebasing is no option for you) you can create a copy of the regular Makefile to use and gitignore:
cp Makefile Makefile.local
echo Makefile.local >> .git/info/exclude
make -f Makefile.local
However, with that variant you need to keep an eye on the (regular, git-controlled) Makefile and update your local version accordingly if necessary.