Implementing (parts of) git from scratch in Rust
In this stream, we implement core pieces of git from scratch by following the CodeCrafters git "course" @ https://app.codecrafters.io/join?via=jonhoo, just like we did for BitTorrent in https://www.youtube.com/watch?v=jf_ddGnum_4.
If you sign up with the link above, you get free access to the challenge (and all their challenges) for 7 days. Alternatively, you can access the content for free (albeit without the nice infrastructure) at https://github.com/codecrafters-io/build-your-own-git.
Video isn't sponsored (as in, I get no money for making the video), though like last time the above _is_ a referral link so that _if_ you find it useful and end up paying that also helps me — maybe a good use for an employee learning budget!
Various links from the video:
My (well, J's) Discord:
https://discord.jonhoo.eu/
GitHub sponsors:
https://github.com/sponsors/jonhoo/
Missing Semester class on git:
https://missing.csail.mit.edu/2020/version-control/
Code at the end:
https://github.com/jonhoo/codecrafters-git-rust
0:00:00 Introduction
0:02:39 Housekeeping
0:04:36 Questions before we start
0:08:39 Initializing the challenge
0:09:47 git init
0:25:27 git cat-file
0:58:21 Mitigating zipbombs
1:08:37 git hash-object
1:41:50 Organize into modules
1:47:41 git ls-tree
2:24:21 git write-tree
3:41:45 git commit-tree
3:59:06 git commit
4:23:56 Outro
Live version with chat: https://youtube.com/live/U8HeVjY9cig
Other Videos By Jon Gjengset
2025-08-01 | Vibe coding complex changes in Rust |
2025-05-30 | Explaining assembly by playing SHENZHEN I/O |
2025-03-10 | Porting the guff plot device to Rust |
2025-01-02 | January 2025 Q&A |
2024-09-21 | Decrusting the quickcheck crate |
2024-08-25 | Implementing a Lox interpreter in Rust |
2024-07-14 | Open Source Maintenance, 2024-07-14 |
2024-05-18 | What's New in Rust 1.72-1.78 Rustacean Station marathon |
2024-05-04 | Q&A May 2024 |
2024-04-05 | Decrusting the tokio crate |
2024-03-09 | Implementing (parts of) git from scratch in Rust |
2024-02-09 | Decrusting the tracing crate |
2024-02-06 | Jon Gjengset Live Stream |
2024-01-14 | Hardware and software [2024 edition] |
2023-12-16 | Q&A December 2023 |
2023-12-15 | Q&A Session |
2023-11-17 | Making the (partial) Rust BitTorrent client more reasonable |
2023-10-19 | Implementing (part of) a BitTorrent client in Rust |
2023-08-26 | Open Source Maintenance, 2023-08-25 |
2023-08-13 | Open Source Maintenance, 2023-08-13 |
2023-08-06 | Open Source Maintenance, 2023-08-06 |