I have two branches that effectively contain the same files, but that are separate for legacy reasons. Call them A and B.
If I run git log --oneline A ^B
Git outputs 114 commits, which is expected.
I can then run git merge -s ours --allow-unrelated-histories A
while on branch B which indicates to Git that A has already been merged into B without making any changes to the end file state. This works, except that B now receives those 114 commits as part of its history (git log
).
How can I mark A as being merged to B without bringing in all of A's history as well?
I tried git merge --squash -s ours --allow-unrelated-histories A
followed by git commit
, but that doesn't have any effect.
Conceptually squashing the -s ours
commit should give me exactly what I want, but it doesn't work.