<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b" -->

---
title: I made my own git | daily.dev
description: A developer built a simplified version control system from scratch to understand git&#x27;s internals. The implementation uses SHA-256 hashing (instead of git&#x27;s...
canonical: https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I made my own git | daily.dev
og:description: A developer built a simplified version control system from scratch to understand git&#x27;s internals. The implementation uses SHA-256 hashing (instead of git&#x27;s...
og:url: https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b
og:image: https://api.daily.dev/og/posts/FWqS5dx1b.png
og:image:alt: I made my own git
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I made my own git

**[Hacker News](https://daily.dev/sources/hn)** · 6 min read · 77 upvotes · 4 comments

## Summary

A developer built a simplified version control system from scratch to understand git's internals. The implementation uses SHA-256 hashing (instead of git's SHA-1) and zstd compression (instead of zlib) to store file objects, tree structures, and commits. The project demonstrates how git works as a content-addressable file store, with commits referencing tree objects that contain file hashes. Key features include recursive directory traversal, object compression/decompression, commit generation with parent tracking, and checkout functionality. The hardest part was parsing the custom object formats, which could be improved by using structured formats like JSON or YAML.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tonystr.net/blog/git_immitation>

## Community discussion

Top comments from developers on daily.dev.

**@khauma** · 5 upvotes

> I should do this one weekend...

**@lunaro\_4** · 0 upvotes

> What is the reasoning behind choosing SHA256, aside from it being newer? As far as I understand, SHA1 is faster. Although it is not as secure, you state that it is not a concern.

**@priyaranjankumar** · 0 upvotes

> Nice, but its not working as of now.

## Similar posts on daily.dev

- [I Built Git from Scratch to Finally Understand What I've Been Using for Years](https://daily.dev/posts/i-built-git-from-scratch-to-finally-understand-what-i-ve-been-using-for-years-3wx3ymzn1) · DEV · 23 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#git](https://daily.dev/tags/git), [#version-control](https://daily.dev/tags/version-control), [#data-structures](https://daily.dev/tags/data-structures)

[View this post on daily.dev](https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I made my own git","url":"https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b"},"datePublished":"2026-01-27T13:37:43.804Z","dateModified":"2026-01-27T13:38:06.364Z","description":"A developer built a simplified version control system from scratch to understand git's internals. The implementation uses SHA-256 hashing (instead of git's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5674e39b23a2703b04010e7f083c10c7?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5674e39b23a2703b04010e7f083c10c7?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":77},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"rust,git,version-control,data-structures","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"I made my own git"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/i-made-my-own-git-fwqs5dx1b","comment":[{"@type":"Comment","text":"I should do this one weekend…","datePublished":"2026-01-28T22:35:11.319Z","url":"https://daily.dev/posts/FWqS5dx1b#c-TFnw25nWV","author":{"@type":"Person","name":"Kahlil Wallace","url":"https://daily.dev/khauma","image":"https://media.daily.dev/image/upload/s--QvppE9Ip--/f_auto/v1767378558/avatars/avatar_7eQFeSQRDx0muV3n92gxT?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"What is the reasoning behind choosing SHA256, aside from it being newer? As far as I understand, SHA1 is faster. Although it is not as secure, you state that it is not a concern.","datePublished":"2026-03-16T10:01:41.955Z","url":"https://daily.dev/posts/FWqS5dx1b#c-N63BJb1my","author":{"@type":"Person","name":"Lunaro_4","url":"https://daily.dev/lunaro_4","image":"https://avatars.githubusercontent.com/u/64870947?v=4"}},{"@type":"Comment","text":"Nice, but its not working as of now.","datePublished":"2026-03-27T04:20:49.207Z","url":"https://daily.dev/posts/FWqS5dx1b#c-u3SbsRguS","author":{"@type":"Person","name":"Priyaranjan Kumar","url":"https://daily.dev/priyaranjankumar","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"}}]}
```

