What are some examples of version control systems that work on files and on lines of files?
In my understanding, a control system that works on file is able to automatically manage merges whenever there are no file conflicts:
for example:
A,B,C --> A',B',C
| (branch) ___________ (merge) -> A',B',C'
-------> A,B,C'
In what cases a version control system that work on lines is able to manage merge by itself and in what other cases it asks the developer to solve them?
Your questions is too broad/generic but I'll try to give a shot anyways.
Most merge strategies in modern Version Control Systems, can't deal with the following:
Suppose you have files
A
B
C
in commit001
in a repository.Developer
Dev1
branch of commit001
and changes one line in fileA
, commits as001a
.Developer
Dev2
branch of commit001
and changes the same line in fileA
and commits as001b
.If someone wants to merge commits
001a
and001b
, the merge system wouldn't be able to tell which is the correct change for the line, maybe the correct change for the project would be using the content in commit001a
or maybe the one in commit001b
, or maybe even mix of both changes in the line (that someone would have to create).That's usually how you get a conflict that need manual intervention, because two developers are working in the same file and line and wrote different changes.
In the rest of the cases the result is obvious: