Prehistory History Linux Git Conclusion Decentralized Version Control Systems Matthieu Moy Verimag 2007 Matthieu Moy (Verimag) DVC 2007 < 1 / 43 >
Prehistory History Linux Git Conclusion Outline Motivations, Prehistory 1 History and Categories of Version Control Systems 2 Version Control for the Linux Kernel 3 Git: One Decentralized Revision Control System 4 Conclusion 5 Matthieu Moy (Verimag) DVC 2007 < 2 / 43 >
Prehistory History Linux Git Conclusion Outline Motivations, Prehistory 1 History and Categories of Version Control Systems 2 Version Control for the Linux Kernel 3 Git: One Decentralized Revision Control System 4 Conclusion 5 Matthieu Moy (Verimag) DVC 2007 < 3 / 43 >
Prehistory History Linux Git Conclusion Backups: The Old Good Time Basic problems: ◮ “Oh, my disk crashed.” / “Someone has stolen my laptop!” ◮ “@#%!!, I’ve just deleted this important file!” ◮ “Oops, I introduced a bug a long time ago in my code, how can I see how it was before?” Matthieu Moy (Verimag) DVC 2007 < 4 / 43 >
Prehistory History Linux Git Conclusion Backups: The Old Good Time Basic problems: ◮ “Oh, my disk crashed.” / “Someone has stolen my laptop!” ◮ “@#%!!, I’ve just deleted this important file!” ◮ “Oops, I introduced a bug a long time ago in my code, how can I see how it was before?” Historical solutions: Matthieu Moy (Verimag) DVC 2007 < 4 / 43 >
Prehistory History Linux Git Conclusion Backups: The Old Good Time Basic problems: ◮ “Oh, my disk crashed.” / “Someone has stolen my laptop!” ◮ “@#%!!, I’ve just deleted this important file!” ◮ “Oops, I introduced a bug a long time ago in my code, how can I see how it was before?” Historical solutions: ◮ Replicate: $ cp -r ~/project/ ~/backup/ Matthieu Moy (Verimag) DVC 2007 < 4 / 43 >
Prehistory History Linux Git Conclusion Backups: The Old Good Time Basic problems: ◮ “Oh, my disk crashed.” / “Someone has stolen my laptop!” ◮ “@#%!!, I’ve just deleted this important file!” ◮ “Oops, I introduced a bug a long time ago in my code, how can I see how it was before?” Historical solutions: ◮ Replicate: $ cp -r ~/project/ ~/backup/ ◮ Keep history: $ cp -r ~/project/ ~/backup/project-2006-10-4 Matthieu Moy (Verimag) DVC 2007 < 4 / 43 >
Prehistory History Linux Git Conclusion Backups: The Old Good Time Basic problems: ◮ “Oh, my disk crashed.” / “Someone has stolen my laptop!” ◮ “@#%!!, I’ve just deleted this important file!” ◮ “Oops, I introduced a bug a long time ago in my code, how can I see how it was before?” Historical solutions: ◮ Replicate: $ cp -r ~/project/ ~/backup/ ◮ Keep history: $ cp -r ~/project/ ~/backup/project-2006-10-4 ◮ Keep a description of history: $ echo "Description of current state" > \ ~/backup/project-2006-10-4/README.txt Matthieu Moy (Verimag) DVC 2007 < 4 / 43 >
Prehistory History Linux Git Conclusion Backups: Improved Solutions Replicate over multiple machines Incremental backups: Store only the changes compared to previous revision ◮ With file granularity ◮ With finer-grained (diff) Many tools available: ◮ Standalone tools: rsync , rdiff-backup , . . . ◮ Versionned filesystems: VMS, Windows 2003+, cvsfs, . . . Matthieu Moy (Verimag) DVC 2007 < 5 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Historical solutions: Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Historical solutions: ◮ Never two person work at the same time. When one person stops working, (s)he sends his/her work to the others. ⇒ Doesn’t scale up! Unsafe. Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Historical solutions: ◮ Never two person work at the same time. When one person stops working, (s)he sends his/her work to the others. ⇒ Doesn’t scale up! Unsafe. ◮ People work on the same directory (same machine, NFS, . . . ) ⇒ Painful because of (2) above. Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Historical solutions: ◮ Never two person work at the same time. When one person stops working, (s)he sends his/her work to the others. ⇒ Doesn’t scale up! Unsafe. ◮ People work on the same directory (same machine, NFS, . . . ) ⇒ Painful because of (2) above. ◮ People lock the file when working on it. ⇒ Hardly scales up! Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Collaborative Development: The Old Good Time Basic problems: Several persons working on the same set of files “Hey, you’ve modified the same file as me, how do we merge?”, 1 “Your modifications are broken, your code doesn’t even compile. Fix 2 your changes before sending it to me!”, “Your bug fix here seems interesting, but I don’t want your other 3 changes”. Historical solutions: ◮ Never two person work at the same time. When one person stops working, (s)he sends his/her work to the others. ⇒ Doesn’t scale up! Unsafe. ◮ People work on the same directory (same machine, NFS, . . . ) ⇒ Painful because of (2) above. ◮ People lock the file when working on it. ⇒ Hardly scales up! ◮ People work trying to avoid conflicts, and merge later. Matthieu Moy (Verimag) DVC 2007 < 6 / 43 >
Prehistory History Linux Git Conclusion Merging: Problem and Solution My version Your version #include <stdio.h> #include <stdio.h> int main () { int main () { printf("Hello"); printf("Hello!\n"); return EXIT_SUCCESS; return 0; } } Matthieu Moy (Verimag) DVC 2007 < 7 / 43 >
Prehistory History Linux Git Conclusion Merging: Problem and Solution My version Your version Common ancestor #include <stdio.h> #include <stdio.h> #include <stdio.h> int main () { int main () { int main () { printf("Hello"); printf("Hello!\n"); printf("Hello"); return EXIT_SUCCESS; return 0; return 0; } } } Matthieu Moy (Verimag) DVC 2007 < 7 / 43 >
Prehistory History Linux Git Conclusion Merging: Problem and Solution My version Your version Common ancestor #include <stdio.h> #include <stdio.h> #include <stdio.h> int main () { int main () { int main () { printf("Hello"); printf("Hello!\n"); printf("Hello"); return EXIT_SUCCESS; return 0; return 0; } } } Tools like diff3 or diff + patch can solve this Merging relies on history! Matthieu Moy (Verimag) DVC 2007 < 7 / 43 >
Prehistory History Linux Git Conclusion Merging: Problem and Solution My version Your version Common ancestor #include <stdio.h> #include <stdio.h> #include <stdio.h> int main () { int main () { int main () { printf("Hello"); printf("Hello!\n"); printf("Hello"); return EXIT_SUCCESS; return 0; return 0; } } } Tools like diff3 or diff + patch can solve this Merging relies on history! Collaborative development linked to backups Matthieu Moy (Verimag) DVC 2007 < 7 / 43 >
Prehistory History Linux Git Conclusion Merging Space of possible revisions (arbitrarily represented in 2D) Matthieu Moy (Verimag) DVC 2007 < 8 / 43 >
Recommend
More recommend