Build Git – Learn Git
kushagragour.in
kushagragour.in
I actually think the namelessness of the repos is one of the things that are unexpectedly cool 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 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
Its concepts might apply to other VCS. But that is immaterial, Git is what we are trying to understand here.
I'm not sure if a full recording can be found anywhere other than buying it from Pragmatic Programmers. https://www.youtube.com/watch?v=bBQJP6D8aGY
I use this talk as an introduction to any Git Immersion workshops that I run (see also http://gitimmersion.com/)
This gives an excellent walkthrough of how Git works, but not only that, serves an excellent exercise on JavaScript. Bravo.
Best way to learn? use it!
Maybe just create a dummy repo and go from there with it. Maybe use the GUI tools until you're comfortable with the command line.
For me personally, it was command line first. If you aren't sure about something with git, googling it will pretty much always throw out your answer.
I'm sure most people are probably aware of : http://try.github.io/
which is a cool little resource for learning git.
Lest you misunderstand, I'm not saying you should stop development, I just thought it might be of interest!
(NB: he's a friend who also happens to be a colleague at work)
Keep up the good work!
i generally support this kind of stuff - however I think that this starts out implementing a source control solution rather than git in particular and its a shame that it follows git so closely later down the line in that regard (but completely understandable given the aim).
solving the problems for yourself you can get some insight into why git is the way it is (and svn, p4, hg, everyone else...)
On a side note, I'm always amazed when someone implements things that are complicated to me in a really understandable ways.