Working on a series of blog posts on rolling your own git in go
I haven’t posted anything in years because I was bored as fuck of writing blog posts to build a brand or whatever. This time around I’m just going to write about stuff that interests me and helps me internalize things, not what I think people might want to read or things that portray me as a super duper professional. Anyway, I’m going to write a series of articles about writing a git client in go mostly to learn go and understand how git works behind the scenes.
Quick introduction about buildspace nights and weekends. It’s a pretty cool program (is program the right word?) that helps you launch anything and everything. Some people build cool hardware products, make music, short films or anything else you can imagine. I joined because I felt like working on a wee hobby project and having accountability is always good.
Recently I’ve been toying with the idea of learning a new programming language because that’s what I like doing most, learning stuff. At the same time I’m using git absolutely everywhere. I think it’s high time I understood how it exactly works behind the scenes. It’s not very complicated and I’m hoping by looking at its internals I’ll gain a deeper understanding how certain flows work and get even better at using git.
Obviously this isn’t going to be a full fledged git replacement. The aim is to implement the basics like init
, add
, commit
and a couple of utility functions like cat-file
and hash-object
while staying 100% compatible with git.
Okay let’s talk specifics. I am absolutely new to go and I won’t know all the patterns the cool kids use these days, so I’m going to stumble through this more than anything. But, you know, perhaps it’s interesting for you to follow along and see me make sense of it because you’re also new to go and want to understand git on a deeper level.
If, on the other hand, you are one of said cool kids and you’re reading this (unlikely, I know, but there’s no limit to people’s boredom sometimes hehe) please let me know if there’s a much better way to solve something. I’d appreciate it a lot!
I’ll try to write these posts in a way that hopefully equips you to follow in my footsteps. If something doesn’t make sense to you just drop me a line.