I use git for everything including managing configurations across machines. One set of configurations is almost the same across every machines, but with a few lines different. I use branches to distinguish machines.
Sometimes, when I do modification on one machine, I will merge the change to master change, such that other machines can have the same change. However, like I said, there are some machine specific configurations, which I don't want to merge.
In the current state, this kind of machine specific configurations is in a manageable scale, like 3, 4 lines. So I am wondering is there any git dark magic to tell git that please do not merge any change in those few lines?
Let me make some clarification here. The word "configurations" is very vague here because it's actually vague. I literally use git for lots of configurations: editors, .bashrc, systemd, apache, and many other you might think of. All those things are for personal purpose, and I use git mainly to avoid spending too much time on these things, and my focus was on reproducibility so I imagine things can work just by cloning and pulling.
Considering the varieties, it would be nice if git can work just like that. Is there a chance to implement git hooks to achieve such goal? I have not implemented any git hook before so I am not aware of the complexity of that.