The Myers diff algorithm: part 1 – The If Works
If you enjoy this article, I have published a book explaining the internals of Git through implementation: Building Git. — As a programmer, you probably use a version control system such as Git, and spend an awful lot of your time looking at diffs. You use them to check over your uncommitted work in progress, to look at what changed in a single commit, to compare two branches before performing a merge, and so on. Diffs are the language through which you understand how things have changed in your software. But as well as being read by people, diffs are used by your version control system to automate changes. You can email a diff to someone and they can use the patch or git apply commands to merge it into their working copy. git merge has to reconcile and merge two or more change histories to produce a single tree, often reconciling changes within the same file. git add --patch lets you select individual changes from a working copy file rather than adding the whole file to the index, and
If you enjoy this article, I have published a book explaining the internals of Git through implementation: Building Git . - As a programmer, you probably use a version control system such as Git , and spend an awful lot of your time looking at diffs. You use them to check over your uncommitted work in progress, to look at what changed in a single commit, to compare two branches before performing a merge, and so on. Diffs are the language through which you understand how things have changed in your software. But as well as being read by people, diffs are used by your version control system to a
saved by
related reading
- Beating Myers algorithm on large diffsjzhao.xyz
- DeltaDBzed.dev
- Git at any scalecursor.com
- explain-diffgist.github.com
- GitHub · Change is constant. GitHub keeps you ahead.github.com
- Visualizing Algorithmsbost.ocks.org
- Reading 5: Version Controlweb.mit.edu
- Using Gitcs61bl.org
- Unified Versus Split Diffmatklad.github.io
- Levenshtein distance - Wikipediaen.wikipedia.org
- OMBD#21: Master Git Diff With These Not-So-Known Commands | by Jon Portella | ITNEXTjportella93.medium.com
- Version Control with Gitweb.mit.edu