{"id":51220954,"url":"https://github.com/sankhya007/my_git","last_synced_at":"2026-06-28T07:03:05.955Z","repository":{"id":321643353,"uuid":"1086625221","full_name":"sankhya007/my_git","owner":"sankhya007","description":"own version control system ","archived":false,"fork":false,"pushed_at":"2025-10-30T18:54:20.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-30T19:37:00.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/sankhya007.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-30T17:13:02.000Z","updated_at":"2025-10-30T18:54:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6bc904b-7386-40a3-b7fd-278005765528","html_url":"https://github.com/sankhya007/my_git","commit_stats":null,"previous_names":["sankhya007/my_git"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sankhya007/my_git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankhya007%2Fmy_git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankhya007%2Fmy_git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankhya007%2Fmy_git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankhya007%2Fmy_git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sankhya007","download_url":"https://codeload.github.com/sankhya007/my_git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sankhya007%2Fmy_git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34880191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-28T07:03:04.988Z","updated_at":"2026-06-28T07:03:05.945Z","avatar_url":"https://github.com/sankhya007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyGit - A Minimal Git Implementation in Python\n\n[![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\n## 📖 Overview\n\nMyGit is an educational implementation of Git version control system written in Python. This project demonstrates the core concepts of Git internals while providing a functional version control system with advanced features like object caching, compression, and cross-platform support.\n\n**🎯 Learning Focus**: Understand Git internals, content-addressable storage, and version control systems through clean, readable Python code.\n\n## ✨ Features\n\n### ✅ Core Features\n- **Repository Management**: Initialize and manage repositories (`mygit init`)\n- **Object Storage System**: Blobs, trees, commits with SHA-1/SHA-256 support\n- **Staging Area**: Add files to staging (`mygit add`)\n- **Commit System**: Create commits with author metadata (`mygit commit`)\n- **History Viewing**: Browse commit history (`mygit log`)\n- **Object Inspection**: Examine stored objects (`mygit cat-file`, `mygit hash-object`)\n\n### 🚀 Advanced Features\n- **Object Caching**: LRU caching for performance optimization\n- **Compression System**: Zlib compression with configurable levels\n- **Delta Compression**: Efficient storage of similar objects\n- **Streaming Support**: Memory-efficient large file handling\n- **Cross-Platform**: Windows, Linux, and macOS compatibility\n- **Colorized Output**: Beautiful terminal interface with progress indicators\n\n## 🏗️ Architecture\n    mygit/\n    ├── src/\n    │ ├── objects/ # Git object system\n    │ │ ├── blob.py # File content storage\n    │ │ ├── tree.py # Directory structure\n    │ │ ├── commit.py # Commit metadata\n    │ │ └── factory.py # Object factory with caching\n    │ ├── commands/ # CLI command implementations\n    │ │ ├── init.py # Repository initialization\n    │ │ ├── add.py # Staging files\n    │ │ ├── commit.py # Creating commits\n    │ │ └── log.py # History viewing\n    │ └── utils/ # Utility systems\n    │ ├── hash_utils.py # Hashing and compression\n    │ └── file_utils.py # Cross-platform file operations\n\n## 🚀 Quick Start\n\n### Installation\n\n#### Method 1: Install as Package (Recommended)\n```bash\n# Clone the repository\ngit clone https://github.com/sankhya007/my_git.git\ncd my_git\n\n# Install in development mode\npip install -e .\n```\n\n#### Method 2: Run Directly\n```bash\npython src/cli.py --help\n# or\npython -m src.cli --help\n```\n\n### Basic Usage\n```bash\n# Initialize a new repository\nmygit init\n\n# Create and stage files\necho \"Hello, MyGit!\" \u003e README.md\nmygit add README.md\n\n# Commit changes\nmygit commit -m \"Initial commit\"\n\n# View commit history\nmygit log\n\n# Inspect objects\nmygit hash-object README.md\nmygit cat-file -p \u003cobject-hash\u003e\n```\n\n## 📚 Available Commands\n\n### Basic Workflow\n| Command | Description |\n|----------|-------------|\n| mygit init | Initialize new repository |\n| mygit add \u003cfile\u003e | Stage files for commit |\n| mygit commit -m \"message\" | Create new commit |\n| mygit log | Display commit history |\n\n### Object Inspection\n| Command | Description |\n|----------|-------------|\n| mygit cat-file \u003cobject\u003e | Display object contents |\n| mygit hash-object \u003cfile\u003e | Calculate object hash |\n\n## 🔧 Advanced Configuration\n\n### Compression Settings\n```python\n# In .mygit/config\n[compression]\nlevel = 6          # 1-9, higher = better compression\nalgorithm = zlib   # zlib, lzma\nenable_delta = true\n```\n\n### Performance Tuning\n```python\n[cache]\nmax_size = 1000    # Maximum objects in cache\nstrategy = lru     # Cache replacement strategy\n```\n\n## 🧪 Testing\nRun the test suite to verify your installation:\n```bash\n# Run all tests\npython -m pytest tests/\n\n# Run specific test module\npython -m pytest tests/test_objects.py\n\n# Run with coverage\npython -m pytest --cov=src tests/\n```\n\n## 🤝 Contributing\nWe welcome contributions! Please see our Contributing Guide for details.\n\n### First Time Contributors\nCheck out issues labeled good-first-issue to get started with the codebase.\n\n### Development Setup\n```bash\n# Fork and clone\ngit clone https://github.com/your-username/my_git.git\ncd my_git\n\n# Setup environment\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\npip install -e .\n\n# Run tests\npython -m pytest tests/\n```\n\n## 📖 Learning Resources\nThis project is excellent for understanding:\n- Git Internals: Object model, references, pack files\n- Content-Addressable Storage: SHA-based object retrieval\n- Version Control Design: Delta compression, branching models\n- Python Architecture: Package structure, CLI development, caching\n\n**Recommended Reading**\n- Pro Git Book\n- Git Internals PDF\n\n## 🐛 Troubleshooting\n### Common Issues\n\n**Issue:** Command not found after installation  \n**Solution:**\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\n**Issue:** Permission errors on Windows  \n**Solution:** Run as administrator or adjust permissions\n\n**Issue:** Large file performance  \n**Solution:** Adjust compression settings in config\n\n## 📊 Performance Notes\n- Small Repositories: Comparable performance to Git  \n- Large Files: Streaming prevents memory issues  \n- Compression: Configurable levels for speed/size tradeoff  \n- Caching: Significant performance improvement for repeated operations  \n\n## 🔮 Roadmap\n**Phase 1: Core Complete ✅**\n- Basic object system\n- Repository management\n- Commit history\n\n**Phase 2: In Progress 🚧**\n- Branching and merging\n- Remote repository support\n- Enhanced diff functionality\n\n**Phase 3: Planned 📋**\n- Git protocol implementation\n- Hook system\n- Performance optimizations\n\n## 👥 Contributors\n\u003ca href=\"https://github.com/sankhya007/my_git/graphs/contributors\"\u003e\n\u003cimg src=\"https://contrib.rocks/image?repo=sankhya007/my_git\" /\u003e\n\u003c/a\u003e\nWe appreciate all contributions! See our Contributors Guide to get started.\n\n## 📄 License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## ⚠️ Important Note\nThis is an educational implementation and should not be used for production version control. Always use the official Git client for important projects.\n\n**MyGit - Understanding Git, one commit at a time. 🎓**\n\nIf you find this project helpful, please give it a ⭐ on GitHub!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankhya007%2Fmy_git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsankhya007%2Fmy_git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsankhya007%2Fmy_git/lists"}