I set myself up a dotfiles repo, hosted on a remote server and used on different machines. For some things I'd like to have individual configurations, e.g. the environment variables differ between machines.
I thought, it would be nice to have an extra branch for the machine-dependent changes, so for example I have the branches server
, notebook
, desktop
, all based on master
with little individual changes (1 to a few commits).
Now the problem is, I want to have those individual changes applied on top, obviously. So I'd alter master
for common changes and rebase
the local desktop
branch upon that. But using rebase
, I can't push
to the remote repo anymore. And I want that, as backup and for syncing, obviously, and it also might happen that I want to alter the branch of machine A while actually working on machine B.
Is it at all reasonable to maintain a single branch for every machine or is there a better solution?
How would I be able to apply the local changes on top, as with rebase, but not losing the ability to push
?
Thanks very much