I appreciate the work that has gone into this, and think it is a great starting point for an interesting tutorial about git.
My concern is that the tutorial ignores or discards ideas essential to how git works, and what makes git different to other version control systems.
As other comments have said, this is showing 'just another SCM system' without illuminating the design decisions that make git different.
For example, in git it is extremely important that commit objects have a unique identifier for any given working directory, history, and commit meta-data. Without this guarantee the distributed architecture of git is (almost) impossible to implement.
In the commit section the tutorial states:
a simple Commit class would have ... a change containing the snapshot of change made. Understanding how a change is actually stored is beyond the scope of this implementation.
This terminology is misleading at best, and skips over a very important concept in how git actually works. The phrase 'snapshot of change made' is misleading, as a commit doesn't contain any explicit information about changes made. Instead, the staged files in the working directory are saved into a 'blob' store, a tree structure is created to represent the directory structure, and a reference to the tree is saved in the commit object. I understand that all this is outside the scope of the tutorial, however an outline of how commits work is important information for anyone trying to understand how git works. For example, the storage format is the primary reason operations in git are so fast.
Again, I like the tutorial, but if it wants to teach about git, as opposed to other version control systems, it needs to ensure the key git concepts are maintained.
I 100% agree. It's always great to try to implement complicated things, but it misses the point if what you're implementing is nothing like the original system. You aren't learning how Git works if you do it that way are instead just mimicking API names
Reiterating on my point again, the aim of this project is not to replicate Git. JS-Git (https://github.com/creationix/js-git) does that.Here I am trying to code basic concepts relaxing complex stuff so that reader can focus & visualize more abstract concepts. I have tried to bring in concepts as and when wanted instead of just overloading the reader with complex stuff all at once.
Which is fine. But you're specifically saying that you are building Git to learn how it works. All I'm saying is, based on your wording, you need a disclaimer that this is not how Git works internally. You can already get the gist from a lot of the comments that they think they now know how Git works after reading this post.
I appreciate the effort and think it's a great idea to implement something your own way, I'm just trying to point out that you're saying this is how THE Git works, which it isn't. Nice write up as a whole though
My concern is that the tutorial ignores or discards ideas essential to how git works, and what makes git different to other version control systems.
As other comments have said, this is showing 'just another SCM system' without illuminating the design decisions that make git different.
For example, in git it is extremely important that commit objects have a unique identifier for any given working directory, history, and commit meta-data. Without this guarantee the distributed architecture of git is (almost) impossible to implement.
In the commit section the tutorial states:
a simple Commit class would have ... a change containing the snapshot of change made. Understanding how a change is actually stored is beyond the scope of this implementation.
This terminology is misleading at best, and skips over a very important concept in how git actually works. The phrase 'snapshot of change made' is misleading, as a commit doesn't contain any explicit information about changes made. Instead, the staged files in the working directory are saved into a 'blob' store, a tree structure is created to represent the directory structure, and a reference to the tree is saved in the commit object. I understand that all this is outside the scope of the tutorial, however an outline of how commits work is important information for anyone trying to understand how git works. For example, the storage format is the primary reason operations in git are so fast.
Again, I like the tutorial, but if it wants to teach about git, as opposed to other version control systems, it needs to ensure the key git concepts are maintained.