https://github.com/kareem-ghazi/kgit
My own Git version control system.
https://github.com/kareem-ghazi/kgit
git github python unix version-control
Last synced: about 2 months ago
JSON representation
My own Git version control system.
- Host: GitHub
- URL: https://github.com/kareem-ghazi/kgit
- Owner: kareem-ghazi
- License: mit
- Created: 2025-04-12T19:31:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-17T21:21:35.000Z (about 1 year ago)
- Last Synced: 2025-04-19T17:57:45.605Z (about 1 year ago)
- Topics: git, github, python, unix, version-control
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Introduction
**kgit** is a minimal Git implementation written from scratch in Python, based on the [wyag](https://wyag.thb.lt/) project. This repository reimplements the core features of the [Git version control system](https://git-scm.com/) from the ground up.
The goal is to demonstrate that, despite its reputation for complexity, the core of Git is simple and elegant.
## What is Implemented?
kgit implements the following core Git commands, compatible with real Git repositories:
- `add`
- `cat-file`
- `check-ignore`
- `checkout`
- `commit`
- `hash-object`
- `init`
- `log`
- `ls-files`
- `ls-tree`
- `rev-parse`
- `rm`
- `show-ref`
- `status`
- `tag`
Each command is a simplified version of its Git counterpart, focusing on clarity and core functionality.
## Getting Started
1. **Clone this repository:**
```bash
git clone https://github.com/kareem-ghazi/kgit
cd kgit
```
2. **Run kgit commands:**
```bash
python3 src/kgit [options]
```
3. **Explore the code:**
The main logic is in `src/kgit/libkgit.py`. Each command is implemented in a clear, readable way.
## License
This project is released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.