I am working on a Project and wanted to merge changes from a git repository.
The remote repo is not ignoring some build files, but i have added those build files to my gitignore (because with different build systems the built files would obviously differ).
So when i try to merge with:
git merge -X ours ns3-mmwave-ext/master
I get an error saying that those build files would be overwritten with merge.
I do not want them to be overwritten, so i followed this answer https://stackoverflow.com/a/26639255/4126652
and tried to do:
git add -f * // Without -f git is complaining because those build files are in my gitignore
git stash
git merge -X ours ns3-mmwave-ext/master
But that still shows the same error that the same untracked working tree files would be overwritten by merge.
Note that ns3-mmwave-ext is a remote and has already been fetched.
Edit:
I can obbiously clean the build files, but the build process is very long and i don't want to rebuild the whole thing for just a few minor changes.
Edit 2:
I am not a contributor to the remote repo so i can't just remove the build files in remote.