Short
Globally in ~/.gitconfig
as well as per repo in .git/config
some settings (such as merge strategies) can be configured. None of these options is kept in the repo itself. Is there a way to define merge strategies that live in the repo (just as .gitigrore
and .gitattributes
)?
Background
Assumed I have some sort of boilerplate git repo that is meant to be forked and used as a starting point for certain projects. Also since the master boilerplate can change but should be in sync with its 'child projects' (or vice versa), I want to add the boilerplate as upstream. This way I am able to git fetch upstream && git merge upstream/master
from time to time to keep up with the changes in the boilerplate.
Now: Certain files will exist in all repos and should intentionally NOT in sync. Take README.md
as an obvious example.