Do you actually know git?

2026

#coding #git #nvim

I thought I knew git ("the stupid content tracker"), at least the way I have used it for research. I made my repos on Github, cloned them locally, and then every once in a while (i.e., when I remembered and was scared to lose progress) I would git add . and push origin main. The funny thing is that, if you had asked me how to restore a previous version, I would have had no idea (bad).

Worse, I wouldn't have been able to identify where some issues actually appeared (bad bad). Thankfully it never came down to that (I have never done anything awfully complicated tbh) but I probably would have just restored the whole project to a previous version, and then would have spent many hours just redoing the things I already did that were fine. All in an attempt to hopefully understand what and where things went wrong.

But perhaps my worst crime was thinking that git just stored differences between files (\(\infty\) bad).

Anyway, enough self-shaming, that is all in the past.

Here is a collection of notes about git and how it actually works. It does not contain everything. But enough so that you can learn how to use anything git has to offer (I think).

The main realization is that git is actually quite simple once you understand what is actually going on under the hood (what people call "the plumbing"). After all, it only took \(5\) days for Linus to make it, and then he finally rested.

Most importantly, it is actually quite fun and it makes you feel powerful in a way [idk how else to say this, but basically it is a really good feeling to actually feel like you know what is going on, and not be scared of doing something wrong (just admit it, how many times have you done something from the terminal, copy pasted from somewhere random, and thought that the probalility you just deleted everything is very much non-zero)].

Last but not least, the vast majority of these notes follow the git course on boot.dev (created by ThePrimeagen), link here. More specifically, many of these notes follow the public video available here. Some of these notes follow exactly the video, others are just me trying out things.

The nice thing is that after understanding the first fundamentals, you can just try out things and see how they work.

Let's start with some General stuff.

← Back to Tutorials