| Crates.io | git-rust |
| lib.rs | git-rust |
| version | 0.1.1 |
| created_at | 2025-10-05 11:22:32.494201+00 |
| updated_at | 2025-10-05 11:26:12.580648+00 |
| description | A simple implementation of Git in Rust |
| homepage | |
| repository | https://github.com/arjav0703/git-rust |
| max_upload_size | |
| id | 1868927 |
| size | 17,786 |
This is a simple implementation of some git commands in Rust. It is a work in progress and currently supports the following commands:
init: Initialize a new git repositorycat-file: Display the content of a file in the git object databasehash-object: Compute the object ID of a file and optionally store it in the git object databasels-tree: List the contents of a tree objectwrite-tree: Create a tree object from the current indexcargo install git-rust
git-rust <command> [args]
# Initialize a new git repository
git-rust init
# Create a new file
echo "Hello, World!" > hello.txt
# Compute the object ID of the file and store it in the git object database
git-rust hash-object -w hello.txt
# Display the content of the file in the git object database
git-rust cat-file -p <object-id>
# List the contents of the tree object
git-rust ls-tree <tree-object-id>
# Create a tree object from the current index
git-rust write-tree