An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          




Sawarly





Latest Release


License


Python


Platform

## 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.