My fiancée hit a git edge case I couldn’t explain. So I did what any reasonable person would do — I rewrote git.
Context
My fiancée ran into an interesting case with git one day, and I could neither understand what was going on nor explain it to her,
but that’s a story for another day.
This led me to think: I really need to better master git. And so began the journey.
What mastering meant
“mastering” git is a big word due to the pharaonic complexity behind how it’s implemented, so the question became more like:
What is it really that I want to understand better or master? And what better things to understand than the basics, right?
A couple of years ago, I read this great article
that explains how git works under the hood and I remember it being really insightful, but I felt like I had forgotten all about it.
I know it’s some sort of misconception, or bias if you’d like, but I always feel that using software that has made
historical revolution to our industry comes with this great desire to really understand how it works, and such was the case with git.
So I immediately thought of the article I referred to before, but then another idea came to me: Would it be absurd to try to make
some basic version of git from scratch myself in order to get better grasp of how it works?
Well, turns out it wasn’t!
Pursuing writing git from scratch
Having built up the initial determination to do this, I didn’t really know where to start from, so I simply typed
writing git from scratch into a search bar and stumbled upon the amazing Write yourself a Git!
article, written by Thibault Polge, and everyone else who contributed as well.
I immediately jumped onto that article to open it, and eventually found myself reading it all and following along. And I thought it’d be a good idea to give back and share what I learned in my own words.
Lesson series
In order to not make this into a long and tiring-to-read post, I will be making a small series out of the things I have learned of my recent experiment, that I will be listing here as I add them, so stay tuned.