We have two repositories: Upstream and Downsteram, with a single config.lua
file that can be different between them. We want to use Pull Requests from Downstream to Upstream (and vice-versa), while ignoring the config.lua
file.
Relevant SO answers that aren't usable:
We don't want to spend time excluding the config.lua
file each time, so the answer in Github - Pull Request, ignore some file changes doesn't work for us.
This answer (Using git, how do I ignore a file in one branch but have it committed in another branch?) doesn't work anymore apparently (and this is the same master
branch anyway).
I couldn't get Github to work with the answer given in https://stackoverflow.com/a/8014154/7656871 . I've tried the following:
- created the config.lua file and changed it differently so as to cause a conflict (which seems like a hack, but apparently needed!)
- added .gitattributes with content
config.lua merge=ours
- added .gitconfig with content:
[merge "ours"] driver = true
- the github PR still detects the change and claims it cannot automatically merge.
I also think it's a bad hack to have to create a merge conflict so this merge strategy would fire (see Is it possible to exclude specific commits when doing a git merge?). It will make the process complicated if there are multiple Downstream forks.
Is there no simple way to ignore one Downstream configuration file when doing pull requests?