I have a fork of sudar's Arduino-Makefile to which I added automatic library detection during compilation to use for Leka and the Bare-Arduino-Project.

I try to keep up-to-date with their changes once in a while before I figure out how to easily merge my changes to their project.

To do that I have to use git rebase but each time I find myself googling the question and wasting half an hour to figure out the correct process.

To never have to waste time again, here is reminder for my future self, that could be useful for others as well.

$ git clone https://github.com/weareleka/Arduino-Makefile
$ git remote add sudar https://github.com/sudar/Arduino-Makefile
$ git fetch sudar
$ git checkout master
$ git reset --hard sudar/master
$ git checkout auto-lib
$ git checkout -b auto-lib-rebase
$ git rebase -X theirs origin/master

Hope you liked it! :)