I would recommend:
- using branching (that way, the order of commit does not matter: each developer records his/her own set of modifications in his/her own branch)
- consolidate the branches on a main 'dico' branch where the conflicts can be resolved
(Git is especially good at this)
You can test it quickly:
C:\test\git>mkdir dico
C:\test\git>cd dico
C:\test\git\dico>git init
Initialized empty Git repository in C:/test/git/dico/.git/
C:\test\git\dico>echo words for B> B.txt
C:\test\git\dico>echo words for K> K.txt
C:\test\git\dico>git add -A & git commit -m "first letters"
[master (root-commit) e91d6fa] first letters
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 B.txt
create mode 100644 K.txt
You have an empty dico in the master branch.
DevA comes along:
C:\test\git\dico>git checkout -b devA
Switched to a new branch 'devA'
C:\test\git\dico>echo Kick the Bucket: my def from devA>>B.txt
C:\test\git\dico>type B.txt
words for B
Kick the Bucket: my def from devA
C:\test\git\dico>git add -A & git commit -m "def from devA"
[devA 0f27595] def from devA
1 files changed, 1 insertions(+), 0 deletions(-)
DevB comes along and get the work of devA:
C:\test\git\dico>git checkout master
Switched to branch 'master'
C:\test\git\dico>type B.txt
words for B
C:\test\git\dico>git checkout -b devB
Switched to a new branch 'devB'
C:\test\git\dico>git merge devA
Updating e91d6fa..0f27595
Fast forward
B.txt | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
C:\test\git\dico>type B.txt
words for B
Kick the Bucket: my def from devA
Oh no! Wrong place for this definition!
C:\test\git\dico>echo words for B>B.txt
C:\test\git\dico>echo Kick the Bucket: my def from devA>>K.txt
C:\test\git\dico>git add -A & git commit -m "move def to K by devB"
[devB 473614d] move def to K by devB
2 files changed, 1 insertions(+), 1 deletions(-)
Fix in devB branch. DevB goes on:
C:\test\git\dico>echo add to def by devB>>K.txt
C:\test\git\dico>git add -A & git commit -m "elaborate def by devB on K"
[devB f9ae17d] elaborate def by devB on K
1 files changed, 1 insertions(+), 0 deletions(-)
Meaning, in the devA branch, devA also work on this definition:
C:\test\git\dico>git checkout devA
Switched to branch 'devA'
C:\test\git\dico>type B.txt
words for B
Kick the Bucket: my def from devA
C:\test\git\dico>type K.txt
words for K
C:\test\git\dico>echo elabore def from devA in B>>B.txt
C:\test\git\dico>type B.txt
words for B
Kick the Bucket: my def from devA
elabore def from devA in B
C:\test\git\dico>git add -A & git commit -m "devA go on on B.txt"
[devA 1da899a] devA go on on B.txt
1 files changed, 1 insertions(+), 0 deletions(-)
If devB checks the devA's work, he will detect the conflict and resolve it appropriately:
C:\test\git\dico>git checkout devB
Switched to branch 'devB'
C:\test\git\dico>git merge devA
Auto-merging B.txt
CONFLICT (content): Merge conflict in B.txt
Automatic merge failed; fix conflicts and then commit the result.
C:\test\git\dico>git diff
diff --cc B.txt
index 1cc6ea9,a986721..0000000
--- a/B.txt
+++ b/B.txt
@@@ -1,1 -1,3 +1,6 @@@
words for B
++<<<<<<< HEAD
++=======
+ Kick the Bucket: my def from devA
+ elabore def from devA in B
++>>>>>>> devA
He will remove the extra definition from B.txt and add it to K.txt (and then will go to devA and will tell him/her to STOP, merge his work, and go on in the right file!)