Becoming a GIT pro. Part 1: internal GIT architecture

2 Likes

Typo: you had

 ls .git/objects/ -l

where you meant

 ls -1 .git/objects/
1 Like

Thanks for catching that, updated!

Well, did you mean for the ls option to be -l, which gives a long listing with permissions, owner, size, mod date, etc; or -1, which prints only the names, but in a single column? The latter is what the output looks like, but your commands use the former. (Note the difference between lower-case “ell” and the digit “one”.)

1 Like

Oh, thanks for the second correction :slight_smile:. Updated.

Hello, thank you very much for this article.
This is very interesting and a real pleasure to learn these git internals.

There is a misleading point in:

$ git checkout $INITIAL_COMMIT_HASH
$ ls
f1.txt f2.txt

You should have f1.txt, f2.txt AND f3.txt
I have been following all the step to be sure, and f3.txt is present.
f3.txt has been created in a previous step and added to the staging area (index). But it is still in the working directory.
When you checkout the commit, the file cannot be temporarly deleted since it has not been commited.

Here a gist of the steps:
https://gist.github.com/AntoineViau/54651823f3d0bab0787913820b1560a3

1 Like

Thanks for noticing that, updated the article!