I believe that even git would work in this scenario because a.txt and b.txt are separate and independent thus a rebase in git is not required.
The point at which this becomes an issue is when both person A and B try to make changes to the same file and specifically the same blob of text within that file.
I could be wrong but this should be simple enough to prove out because I've run into this situation before where I forgot to rebase before pushing my changes but git still accepted the changes as they were independent of the changes that person B made.
jacoblambda|2 years ago
The solution would be to pull upstream changes (so you know what you are potentially pushing your changes into) and then push.
Arelius|2 years ago
A rebase is never required in Git. (people/maintainers may disagre) but a merge will always do.
Having said that. In your scenario provided, a pull + merge/rebase will be required. It will then resolve automatically, and without conflicts. But a human has to be involved to provide a strict sequence/dag of the those commits.