Depending of the system, specific files might be needed. The way we handle this is by creating a .local version of the file that get sourced by the non-local file. For example, let's say we want system specific config for .zshrc While working locally on master branch
- create .zshrc.local and init the file with standard content (mostly comments to say what it does)
- source .zshrc.local in .zshrc:
source ~/.zshrc.local - add
.zshrc.local merge=oursto .gitattributes config add ~/.zshrc.local ~/.gitattributes ~/.zshrcconfig commit -m "Add .zshrc.localconfig checkout macosconfig merge masterDon't merge directly from github or bitbucket, the merge=ours drivers wouldn't work
You can now modify the local version of the file inside the macos branch. Modifications won't be erased from a merge from master. For other configurations, do the modifications on master branch then locally merge to local branch on your client.