{"id":27949151,"url":"https://github.com/jscina/minigit","last_synced_at":"2025-05-07T15:20:04.177Z","repository":{"id":290637210,"uuid":"975120527","full_name":"Jscina/minigit","owner":"Jscina","description":"A minimalist version control system written in Rust, inspired by the core concepts of Git.","archived":false,"fork":false,"pushed_at":"2025-04-30T16:56:01.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T15:19:59.868Z","etag":null,"topics":["git","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jscina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-29T20:17:49.000Z","updated_at":"2025-04-30T16:57:13.000Z","dependencies_parsed_at":"2025-04-29T21:28:13.256Z","dependency_job_id":"166c168e-6715-4e39-870a-bc4ddc982c66","html_url":"https://github.com/Jscina/minigit","commit_stats":null,"previous_names":["jscina/minigit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jscina%2Fminigit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jscina%2Fminigit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jscina%2Fminigit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jscina%2Fminigit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jscina","download_url":"https://codeload.github.com/Jscina/minigit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902620,"owners_count":21822263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","rust"],"created_at":"2025-05-07T15:20:03.426Z","updated_at":"2025-05-07T15:20:04.154Z","avatar_url":"https://github.com/Jscina.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniGit 🧪\n\nA minimalist version control system written in Rust, inspired by the core concepts of Git.\n\nMiniGit supports a basic local workflow:\n\n- `init` a repository\n- `add` files to a staging area\n- `commit` changes with a message\n- view the commit `log`\n\nIdeal as a learning tool or tiny custom VCS for personal projects.\n\n---\n\n## 🚀 Features\n\n✅ `minigit init`  \nCreates a `.minigit/` directory with the required structure:\n\n- `objects/`: stores file and commit blobs\n- `index`: tracks staged files\n- `HEAD`: tracks the latest commit\n\n✅ `minigit add \u003cfiles or directories\u003e`  \nStages files for commit by hashing their content and saving them to `objects/`.\n\n- Supports globbing via shell (`minigit add src/*.rs`)\n- Recursively adds directories\n- Ignores files listed in `.minigitingore`\n\n✅ `minigit commit -m \"message\"`  \nCreates a commit:\n\n- Stores a JSON blob with timestamp, message, and staged file hashes\n- Clears the index\n- Updates `HEAD` to point to the new commit\n\n✅ `minigit log`  \nDisplays info about the latest commit:\n\n- Commit hash\n- Timestamp\n- Commit message\n- List of files and hashes\n\n---\n\n## 🗃️ Commit Format\n\nCommits are stored as JSON inside Git-style blob objects:\n\n```json\n{\n  \"message\": \"Initial commit\",\n  \"timestamp\": \"2025-04-30T15:00:00Z\",\n  \"files\": [\n    { \"path\": \"src/main.rs\", \"hash\": \"5dd01c...\" },\n    { \"path\": \"README.md\", \"hash\": \"9a2fe1...\" }\n  ]\n}\n```\n\n---\n\n## 📂 `.minigitingore`\n\nUse this file in your root directory to ignore files or folders from being staged.\n\nExample:\n\n```\ntarget/\n*.log\n*.rs.bk\n```\n\n---\n\n## 🛠 Build\n\n```bash\ncargo build --release \u0026\u0026 cp target/release/minigit /usr/local/bin\n```\n\n# Usage:\n\n```bash\nminigit init\nminigit add src/\nminigit commit -m \"Add core logic\"\nminigit log\nminigit --help\n```\n\n---\n\n## 📦 Dependencies\n\n- [`clap`](https://crates.io/crates/clap) – CLI argument parsing\n- [`sha1`](https://crates.io/crates/sha1) – Git-style hashing\n- [`serde`](https://crates.io/crates/serde) + [`serde_json`](https://crates.io/crates/serde_json) – commit serialization\n- [`chrono`](https://crates.io/crates/chrono) – timestamps\n- [`anyhow`](https://crates.io/crates/anyhow) – error handling\n\n---\n\n## 📎 License\n\nMIT. Build cool stuff.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscina%2Fminigit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjscina%2Fminigit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscina%2Fminigit/lists"}