In several projects, I need to have two branches/repos that are exactly the same, except that I want one commit to appear in one branch and not in the other (for exemple because the git repo I'm following don't set up the good environnment variables for my machine, or because one branch is specific to a given OS and the other one is for another system, but the difference between the two branches is just a matter of a few lines…).
In an ideal world, I would like to automatically apply the changes to the other branch when I modify it, or, for repos, when the upstream repo gets updated.
I saw some tricks involving git hooks, but the hooks are just local to a given computer, so if I clone the repo I'll need to manually re-create the hook files…