How does Multiple Check Out work in version control?
If a file is multi checked out, more than one developer work on it concurrently, and their changes need to be merged together on check-in.
- Multi check-out
For example, in the following figure, user A and user B check out File1 at version 3 sequentially. And then they started modifying the file in their working folders separately.
(User A and User B check out File1 sequentially.)
- First user performs check-in
After a while, user A finishes her modification and commits her changes (Delta A) to the repository. Version 3 plus users A’s changes makes version 4.
(User A finishes the modification and updates the server copy)
- Second user performs check-in
On user B’s check-in, the system cannot just simply update the latest version with user B’s copy, or user A’s changes will be overwritten without being realized. To incorporate both users’ changes in one version, merge happens.
(User B finishes the modification. On check-in, merge happens to incorporate his change to version 4A. And the copy containing both changes in 4A and 4B makes version 5.)
In the next article, I will discuss more about how merge works.