Gitnetics is a tool to help the task of maintaining a different, slightly modified copy of an upstream project. It does so automatically by following upstream changes, attempting merges with your local modifications, test the result of such merge for compliance with your environment, and finally push the tested result to the local copy
You can find some documentation Here