Is there a git merge command that merges another branch into the current branch, but doesn't change any files?
Or in other words, I want to create a new commit on branch A with:
- The same tree (files) as latest commit on branch A
- Parent commit should be latest commit on branch A
- Other parent commit should be latest commit on branch B
Consider two long running branches one mine, one theirs. I want to merge their branch onto my branch, but since the code is effectively doing the same, I want to mark it as merged. The next time I'm merging again, it will not look back further than the merge commit that will be created in this process.
I know about -X mine
/--strategy-option=mine
but that will only kick in when there's an actual merge conflict. No added/deleted files should be applied on my branch.