aside from "AHA! moments" there are "hell yeah!" moments when you manage to find a clear and short educational material that covers core conceptual model, so that you wouldn't have to read docs to figure out the gist of it! I love docs, but life is too short to read them all) Thanks a lot! You've saved two days of my life! Multiply that by the number of views ~13k and you've got almost one human life saved!) Great job!
@lynndemarest19026 жыл бұрын
What did that poor keyboard ever do to you? :)
@artembordiuh28024 жыл бұрын
Wonderful tutorial! But the Whac-A-Mole game with the keyboard is very loud.
@AkshayAradhya2 жыл бұрын
Man we need more of these intermediate in-depth tutorials. So well made. Every other video tutorial just talks about basic git stuff branches, commits, etc.
@usoppgod81073 жыл бұрын
I cannot stress enough how wonderfully things were explained. Cheers man!
@LeeZhenYong3 жыл бұрын
This is so well explained! I got a deeper appreciation of how cleverly designed git is. I never knew each time I do git commit it tracks every single file; imagine a project with hundreds of files!
@cyantarek5457Ай бұрын
This is the best ever low level internals explanation on how git works (like Ben Eater). A gift for us low level fans
@andyd56811 ай бұрын
Beyond helpful because of its level of detail and precision.
@shyamgadepalli97865 жыл бұрын
Great video! Explains in detail how Git works under the hood. The last two examples were an icing on the cake. Thanks for putting this together!
@vil93863 жыл бұрын
wow, so glad I watched this. This 30min gave me so much insights of git design (hands-on way!!) and it made git usage instantaneously easier. THANK YOU!
@ansadahmad19586 ай бұрын
Thank you sir for this video! Your efforts into making a simplified free video is much appreciated by us all curious learners!!
@melisoner89814 жыл бұрын
I wasn't afraid of the shas before but this took it to a different level. Thank you.
@Igor1601932 жыл бұрын
I never feared the SHA, but now I understand the SHA. Thank you
@bulletbeatboxer2 жыл бұрын
I send all my new devs this video! SO key in understanding how to use git.
@prasadkailkeresridhar83164 жыл бұрын
Brilliant demo of the internals of git! thanks for the information...helps with a good foundation knowledge to understand git commands..thank you David for helping understand.
@KiLVaiDeN2 жыл бұрын
Very interesting tutorial on how the .git folder is impacted by some basic git commands internally, for me it's as important for a git user than knowing how a cpu works for a developer :) Thank you David for this introduction, it will for sure allow me to understand and research about even deeper plumbing of git in the future :)
@komalvenkatesh45275 жыл бұрын
Great video. Exactly what I was looking for! Thank you. Every so called "weird/scratch your head" moment in git makes sense now.
@MrHav1k4 жыл бұрын
I'm not even a developer, just an infrastructure guy, but this was an excellent explanation.
@TeenyPort4 жыл бұрын
awesome video so far, but I believe around minute 19:20 when you say "this commit points to 2 files" you are actually talking about the new tree pointing to foo.txt and bar.txt
@nneddenn6207 Жыл бұрын
Nice and crisp explanation! It was good
@JiaweiCao4 жыл бұрын
Thank you! You explained what happens in git internally in a very easy and clear way!
@emadpres4 жыл бұрын
Fantastic tutorial! Now it's clear to me when we say Git doesn't store diffs.
@majorgnu4 жыл бұрын
It kinda does in pack files, but only as a space-saving optimization, not as a part of its core model.
@RohitSoni1 Жыл бұрын
Goes deep on just one thing ..what's behind the 40 char SHA and makes it easy!! Thanks much!! 😊
@lorenzoluisalbano3695 Жыл бұрын
Beautiful. Looking at the hashes and the contents of each file referring to (or named after those) hashes you begin to gain understanding... of just what the eff they have got inside, what they are supposed to be, and what they are connected to. So explicit that pleases and hurts. Kudos for teaching us the most important git command (and how to refer to each of them by the first 6 digits of the hash.): $ git cat-file -t dc23ab / git cat-file -p dc23ab
@tigranrostomyan92315 ай бұрын
This is CRAZY. Thank you so much!
@architgupta40875 жыл бұрын
Amazing. Cleared a lot of things for me.
@parthbhimani97784 жыл бұрын
Thank you for this. Clearly understood the basic internal workings of git.
@ekbastu3 жыл бұрын
Hey Thomas, you made my day. Thank you so much .
@KelvinTrambadiya6 жыл бұрын
Thanks much.! Really helps a lot to start understand internals and data structure behind it.
@deltonvaz71265 жыл бұрын
Amazing video! RIP keyboard
@jonathanlamb87893 жыл бұрын
Really clearly explained and well presented - thanks for creating this!
@HarshKapadia3 жыл бұрын
Awesome talk, David! Thank you!
@akimbbo_upnext Жыл бұрын
So lets say if in my git repo in i would make a change in every file each time i do a commit then git would have to allocate space on disc equal to how much space repo does take (more or less) and multiply it by number of commits? Also great video!
@kennethcarvalho3684 Жыл бұрын
This was very helpful in understand ing git.. Thanks
@PauloMesquita206710 ай бұрын
I'm a little late to the party but: If this is "the information manager from hell" I can't imagine how the others are..... 🙂 Great job on explaining the object structure and how git does things in a practical and simple manner. Thank You Ver Much!
@p-a56033 жыл бұрын
This took me an hour. 30 minute watching git internals video, 30 minute writing python function handling creating/deleting folder with 100 files :D
@ahmedbenziada97846 жыл бұрын
Wonderful explanation. That's what I was looking for. Thanks man.
@UPPERKEES6 жыл бұрын
What I still don't understand is how git is able to change the file system view. When you cd into a directory, you'll see the files/dirs of that commit reference. When you go to a different git branch, the file system view changes along with it. ext4 and other file systems also use references (inodes) to display files. Is git just a sort of overlay file system? If so, how would that work with so many different file systems and operating systems?
@TheHowlTube6 жыл бұрын
It really doesn't make any special changes to the file system itself - it's not FUSE. When you git checkout a branch, it first changes the HEAD to be the new hash or the new branch. Once the HEAD is sorted, it'll go ahead and figure out what changes it needs to make to your worktree. After that, it's a matter of changing all the files in the directory, which can be done without knowledge of the filesystem.
@amirrezalotfi89192 жыл бұрын
Awesome video!!!!! It is exactly what I was looking for.
@RahulGupta-wd3lf Жыл бұрын
So just to be clear there are duplications in blobs every time we change a file?
@ueiwqoak2 жыл бұрын
Great video. Is there a software tool to visualize ALL the sha references? I know you can see the commit DAG, but I want to see the commit+tree+blob DAG, like what was visualized at @10:37
@ueiwqoak2 жыл бұрын
Like are there any pyviz like tools that can automatically generate the clean, beautiful diagram you made at @10:37 but for and Git repo? It’s clear you could make the diagram by crawling through the objects file but that seems frustrating and unnecessary
@JeffreyDeveloperCOL5 жыл бұрын
Thanks for this excellent video. Awesome the last surprise part
@NicolasIvanov3 жыл бұрын
AHA moment worked, thank you!!
@ws96913 ай бұрын
Awesome explanation!
@tileq3 жыл бұрын
Excellent presentation.
@yeoahjang56954 жыл бұрын
Awesome video, loved the exercise, I learned a lot from it, thank you!
@rajbopche79924 жыл бұрын
In your Git model PDF you showed a single commit having multiple trees following parent-child pattern. However, practically when you showed the contents of a commit it just held reference to one single tree + one single tree only held reference to one/multiple blobs. What are we missing ?
@jamesburgess91014 жыл бұрын
tree objects are flat lists of references. References to both blobs and other trees. If the db needs to represent a sub-directory in your repo you would see a tree reference inside a tree. The example did not have any files in sub-directories.
@DennisAllard5 жыл бұрын
Outstanding presentation of the fundamental git add/commit semantics. Do you have a overview video on fetch/merge/pull? Suggestion: you mention branches in the intro and towards the end of the presentation you give a simple example of creating a new branch (named foobranch). It would be useful to point out the effect of the first commit of foobranch to HEAD and the pointer values of foobranch and master both before and after the commit. That all begs for a second excellent video on branching. The subtleties of file timestamps are also interesting to comment on. Hint, Git does not record file timestamps. BYW I like the sound of your keyboard. (-:
@pgangloff5 жыл бұрын
Thank you! [bibs on the wall=trail?] I'll google some more and try it for myself but it would be great to see an example where you rename a file. I think in those cases, we lose the history of the changes to a file? i.e: this would be considered "deleted a file" + "added a file". I'm not sure I understand Linus' philosophy on that one... That's where I'm still confused... Just starting up on git; our team uses SVN and, migrating to git, many are worried that git "loses commit history" when refactoring/renaming files. [ignore svn2git issues, I'm talking about a project already in git]
@baharalirezaei36085 жыл бұрын
Great explanation,Thanks a lot🌺
@haccks.3 жыл бұрын
How come git add results in adding blob to the objects directory? Shouldn't it be done after running git commit command?
@shayestaparveen3154 жыл бұрын
This video is amazing! Thank you so much.
@blackhalo1173 жыл бұрын
Thank you very much for this video!
@RossiMurilo3 жыл бұрын
Great content! Thanks for sharing!
@nickV7033 жыл бұрын
So many aha moments! And so well explained!
@_ashout Жыл бұрын
It's crazy I really thought that internally git would store diffs.
@roycechristongoveas5836 Жыл бұрын
Crazy video amazing explanation 🤩
@ChrisAthanas Жыл бұрын
12:57 this is how the video should start Ave then the slide show after or in between the code and slides The slides are eye glazing material without the code
@prakashk786 жыл бұрын
Thank you , all of git commands are playing with tree, blob, commit object :) thanks for nice explaination
@asadmoosvi4 жыл бұрын
Fantastic content. Learnt a lot from this.
@navinmeshram75414 жыл бұрын
The famous Butterfly keyboard it is.
@vedantneema2 жыл бұрын
amazing explanation
@AliAnwarwish4 жыл бұрын
Thanks a lot. Very informative video.
@sergiomorenosuay30302 жыл бұрын
Fantastic video!
@tanchienhao2 жыл бұрын
Awesome lesson!!
@biplavtimalsina96444 жыл бұрын
Such a good video. Thanks ton man!
@hyperbitcoinizationpod3 жыл бұрын
Is git also making a chain of hashes, like a blockchain?
@FugalBaboon2 жыл бұрын
Confused why he kept re-adding files (git add ....). In all my git experience I add it the first time and never have to add again.
@giscardboulou58866 жыл бұрын
why you so angry at your keyboard man! For real tho it's distracting :) good video!
@gustavomuller71908 ай бұрын
Great video!
@LaurenceBrown-rx7hx3 жыл бұрын
Does anyone know what music was used for the intro?
@amarjawla3 жыл бұрын
Amazing video .. cheers !!
@harshraj22_4 жыл бұрын
I read that sha1 is a cryptographic algo, for which encrypting is easy, but encrypting from encrypted is nearly impossible. If git hashes all contents to sha1 hashes, how does it decrypts the contents so fast and correctly while say changing branch ?
@Knirin3 жыл бұрын
Git doesn’t store the objects in an encrypted form. They are compressed and the hash is used as a name in a phone book to look them up. You can’t decrypt a sha1 hash into its original input you can however find another input that will give the same hash. This is called a collision. Password cracking is looking for variants on known passwords and the dictionaries of various languages to find words that have matching hashes. The longer and more random a password is the more attempts are required to find a match.
@christiansakai5 жыл бұрын
This is what I need!
@NLmkkillah5 жыл бұрын
This would be amazing if it would've been correct since you say trees have the complete current state as blobs, but at 11:05 you show trees pointing to other trees.
@daya05766 жыл бұрын
Thx a lot, glorious tutorial!
@sureshkumar-hu3ld4 жыл бұрын
Awesome. Really useful
@coreyp.7894 жыл бұрын
Very nice! Thanks.
@majorgnu4 жыл бұрын
9:50 "The contents of these files is *encrypted"* That's not the term you were looking for. Git storing objects in a compressed, application specific format is not a form of encryptiom.
@abdulmatin32084 жыл бұрын
It should be like that right? "Git stores the content in a compressed format and creates the SHA1 based on the compressed contents meaning compressed data are the parameter to produce the sha1 keys"?
@majorgnu4 жыл бұрын
@@abdulmatin3208 SHA1 is not a cypher. It doesn't encrypt stuff. SHA-1 is a cryptographic hash function. A hash function maps data of a variable size to values of a fixed size (hashes) - 20 bytes long in the case of SHA-1. The "cryptographic" part means that it's considered to have a set of properties that makes it useful in cryptographic applications. Perhaps the most important property being that it's very hard to find hash collisions, i.e. two inputs that produce the same output. Git uses SHA-1 as the hash function of its *content addressable storage* system. Content addressable storage is a way to organize stored data where the identifier for a piece of data (a git object in our case) is derived from the data itself. To summarize: git objects are stored is a simple, unencrypted format that happens to use compression to save space. SHA-1 is only used to *identify* the objects in git's content addressable storage system.
@arindammukherjee32614 жыл бұрын
Start at 3:40.
@rohit1987j6 жыл бұрын
nice way of explanation.
@sydneysights8697 Жыл бұрын
Excellent !!
@AliAnwarwish4 жыл бұрын
How to view the content of blob if it's not text file? Just say it is image of zip file or something.
@prashantvaishla4995 жыл бұрын
very informative . thank you
@kushagragautam39796 жыл бұрын
What is the purpose of local repository? Let's take a case that we have central repository and our workspace only. What difference will local repository make?
@TheSrishanbhattarai6 жыл бұрын
You might want to check out Linus Torvald's talk on Git, particularly where he emphasizes the distributed nature of Git, and how it's superior to centralized version control systems like SVN etc.
@thats-no-moon2 жыл бұрын
This is gold
@gagangupta12554 жыл бұрын
Awesome video
@aquere5 жыл бұрын
Thank you for this video
@iblockdev73426 жыл бұрын
is there any alternative to watch command on windows and mac os x?
@Aarmaxian3 жыл бұрын
Too good to be true!!
@italian_boy4025 жыл бұрын
What utility did you use to split the shell?
@AliAnwarwish4 жыл бұрын
1. He's using screen command. You need to install it by "apt install screen". 2. I would suggest you to intall terminator on linux. It's a very smooth terminal splitter and works like charm.
@GintsPolis7 жыл бұрын
Thank you!
@alexandersviridov86823 жыл бұрын
brilliant!
@eashanmathur20304 жыл бұрын
Thanks sir 🙏🏼
@techwithraj11 Жыл бұрын
stupendous
@rdd13r Жыл бұрын
It's "working copy" not working directory
@idc194 жыл бұрын
Thank you
@hsaidinsan63454 жыл бұрын
20:45 Doug DeMuro This is the new Bmw x5 ......
@mvizavis63512 жыл бұрын
Voila !
@shivanshhanda75534 жыл бұрын
What terminal is he using? Doesn't look like gnome-terminal
@AliAnwarwish4 жыл бұрын
1. He's using screen command. You need to install it by "apt install screen". 2. I would suggest you to intall terminator on linux. It's a very smooth terminal splitter and works like charm.
@shivanshhanda75534 жыл бұрын
@@AliAnwarwish thanks.
@AliAnwarwish4 жыл бұрын
@@shivanshhanda7553 Hey bro. You can install tmux too. I'm using it rn.
@shivanshhanda75534 жыл бұрын
Hey man, I switched back to gnome-terminal as terminator was showing strange characters when using. Will give tmux a try, thanks. Edit: Also, I found gnome-terminal to be faster than terminator, eg when I cd to a big git repo, terminator takes more time to load.
@AliAnwarwish4 жыл бұрын
@@shivanshhanda7553 Yes I do agree. But tmux is better at session management too. Yeah nice, worth a try.
@majorgnu4 жыл бұрын
Saying that git is a DAG sounds like a challenge to researchers working on intentional cryptographic hash collisions. It's all fun and games until someone finds a commit that has itself as a parent. :)
@Knirin3 жыл бұрын
Replacing sha1 with a different hash algorithm wouldn’t be difficult. You can use the bit length of the hashes to distinguish them. Compatibility might be a pain temporarily. I am not sure if the known attacks on sha1 allow constructing arbitrary input that collides.