Can I save a file permanently without changes?
I want to:
If there are two branches (A) and (B), they have the same file. For instance,
In branch (A), the setup file has the following:
this is setup in a branch A
In branch (B), the “setup” file has the following:
this is setup in a branch B
These branches do not have uncommitted files (different commits for the same files in different branches).
The GOAL is to prevent these files from being affected after merging these branches.
The solutions in How to tell Git to always choose my local version and Prevent file merging with the wizard using Git do not work. Because they only work in conflict when they are combined. (Well, yes, there will be a conflict if we combine these two branches, and it works once. But if we combine (A) and (B), then (B) - (A), then the files become the same in both branches)
Does Git have such features?
source share