{"id":27292527,"url":"https://github.com/prasundas99/demogit-a-lightweight-git-simulator","last_synced_at":"2025-04-11T22:10:12.720Z","repository":{"id":270609017,"uuid":"891154704","full_name":"Prasundas99/DemoGit-A-Lightweight-Git-Simulator","owner":"Prasundas99","description":"A lightweight implementation of Git fundamentals in C#, designed for educational purposes. This project demonstrates the core concepts of Git's internal workings while providing basic GitHub integration.","archived":false,"fork":false,"pushed_at":"2025-01-01T18:49:00.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T19:36:14.160Z","etag":null,"topics":["console-application","demogit","git-clone"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Prasundas99.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}},"created_at":"2024-11-19T20:30:45.000Z","updated_at":"2025-01-01T19:01:40.000Z","dependencies_parsed_at":"2025-01-01T19:36:18.708Z","dependency_job_id":"6d3d8636-fcf5-4fb4-a033-44b05313fb4b","html_url":"https://github.com/Prasundas99/DemoGit-A-Lightweight-Git-Simulator","commit_stats":null,"previous_names":["prasundas99/demogit-a-lightweight-git-simulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prasundas99%2FDemoGit-A-Lightweight-Git-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prasundas99%2FDemoGit-A-Lightweight-Git-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prasundas99%2FDemoGit-A-Lightweight-Git-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prasundas99%2FDemoGit-A-Lightweight-Git-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prasundas99","download_url":"https://codeload.github.com/Prasundas99/DemoGit-A-Lightweight-Git-Simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487696,"owners_count":21112191,"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":["console-application","demogit","git-clone"],"created_at":"2025-04-11T22:10:11.263Z","updated_at":"2025-04-11T22:10:12.705Z","avatar_url":"https://github.com/Prasundas99.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DemoGit - A Lightweight Git Simulator\n\nA lightweight implementation of Git fundamentals in C#, designed for educational purposes. This project demonstrates the core concepts of Git's internal workings while providing basic GitHub integration.\n\n## Video Demo \n\n\nhttps://github.com/user-attachments/assets/5d93ae48-4c3f-4591-bece-be5ca6f9ab4e\n\n\n\n## Features\n\n- **Basic Git Operations**\n  - Repository initialization and removal\n  - File staging and unstaging\n  - Commit creation\n  - Status checking\n  - GitHub integration (push and clone)\n\n- **Low-Level Git Operations**\n  - Object hashing\n  - Tree manipulation\n  - Object content inspection\n  - Index management\n\n## Prerequisites\n\n- .NET 6.0 or higher\n- GitHub account (for remote operations)\n- GitHub Personal Access Token (for push/clone operations)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/demogit.git\n```\n\n2. Build the project:\n```bash\ncd demogit\ndotnet build\n```\n\n## Usage\n\n### Basic Commands\n\n#### Initialize a Repository\n```bash\ndemogit init\n```\n\n#### Add Files to Staging\n```bash\ndemogit add \u003cfilename\u003e    # Add specific file\ndemogit add .            # Add all files\n```\n\n#### Check Repository Status\n```bash\ndemogit status\n```\n\n#### Create a Commit\n```bash\ndemogit commit \"Your commit message\"\n```\n\n#### Push to GitHub\n```bash\ndemogit push \u003cgithub-token\u003e \u003crepository-name\u003e\n```\n\n#### Clone from GitHub\n```bash\ndemogit clone \u003cgithub-token\u003e \u003crepository-url\u003e\n```\n\n### Advanced Commands\n\n#### Examine Git Objects\n```bash\ndemogit cat-file \u003ctype|size|content\u003e \u003chash\u003e\n```\n\n#### Create Object Hash\n```bash\ndemogit hash-object -w \u003cfile\u003e\n```\n\n#### List Tree Contents\n```bash\ndemogit ls-tree \u003ctree-hash\u003e\n```\n\n#### Create Tree Object\n```bash\ndemogit write-tree -w \u003chash\u003e\n```\n\n## GitHub Integration\n\nTo use GitHub features (push/clone), you'll need a Personal Access Token:\n\n1. Go to GitHub Settings → Developer Settings → Personal Access Tokens\n2. Generate a new token with 'repo' scope\n3. Save the token securely\n4. Use the token in push/clone commands\n\n## Project Structure\n\n```\nDemoGit/\n├── Program.cs                 # Main program entry\n├── DemoGitCommands.cs        # Command implementations\n├── DemoGitHelper.cs          # Utility functions\n└── Models/\n    └── TreeEntry.cs          # Tree entry model\n```\n\n## Implementation Details\n\n- Uses SHA-1 for object hashing\n- Implements basic Git object types (blob, tree, commit)\n- Includes .gitignore support\n- Handles binary and text files\n- Supports basic GitHub API integration\n\n## Limitations\n\n- Single branch support (main only)\n- No merge functionality\n- Basic GitHub integration\n- No SSH support\n- Limited error recovery\n- No diffing functionality\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Educational Purpose\n\nThis project is designed for learning Git's internal mechanisms and should not be used as a replacement for Git in production environments.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by Git's internal design\n- Built for educational purposes\n- Thanks to the Git community for documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprasundas99%2Fdemogit-a-lightweight-git-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprasundas99%2Fdemogit-a-lightweight-git-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprasundas99%2Fdemogit-a-lightweight-git-simulator/lists"}