Comprende Git escribiendo tu propio herramienta en Python

git

#1

Write yourself a Git!

This article is an attempt at explaining the Git version control systemfrom the bottom up, that is, starting at the most fundamental level moving up from there. This does not sound too easy, and has been attempted multiple times with questionable success. But there’s an easy way: all it takes to understand Git internals is to reimplement Git from scratch.

No, don’t run.

It’s not a joke, and it’s really not complicated: if you read this article top to bottom and write the code (or just clone the repository — but you should write the code yourself, really), you’ll end up with a program, called wyag , that will implement all the fundamental features of git: init , add , rm , status , commit , log … in a way that is perfectly compatible with git itself. The last commit of this article was actually created with wyag , not git . And all that in exactly 503 lines of very simple Python code.

https://wyag.thb.lt/