{"id":29225636,"url":"https://github.com/unkn0wn-root/git-go","last_synced_at":"2025-07-10T20:32:46.329Z","repository":{"id":302534676,"uuid":"1012748184","full_name":"unkn0wn-root/git-go","owner":"unkn0wn-root","description":"Git written in Go","archived":false,"fork":false,"pushed_at":"2025-07-09T07:32:45.000Z","size":18111,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-10T02:46:11.581Z","etag":null,"topics":["git","github","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/unkn0wn-root.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-02T20:22:29.000Z","updated_at":"2025-07-09T07:32:49.000Z","dependencies_parsed_at":"2025-07-02T23:20:03.210Z","dependency_job_id":"85b663da-82dc-4ee9-9f81-8a740f832df8","html_url":"https://github.com/unkn0wn-root/git-go","commit_stats":null,"previous_names":["unkn0wn-root/git-go"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/unkn0wn-root/git-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkn0wn-root%2Fgit-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkn0wn-root%2Fgit-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkn0wn-root%2Fgit-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkn0wn-root%2Fgit-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unkn0wn-root","download_url":"https://codeload.github.com/unkn0wn-root/git-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkn0wn-root%2Fgit-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264652712,"owners_count":23644316,"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","github","go","golang"],"created_at":"2025-07-03T07:11:13.891Z","updated_at":"2025-07-10T20:32:46.324Z","avatar_url":"https://github.com/unkn0wn-root.png","language":"Go","readme":"# git-go\n\nA Git implementation written in Go.\n\n**Note**: This is pretty much WIP and some things may be broken in some cases. There are no docs. and code comments are almost non-existing but these will be worked on when the implementation is stabilized (if ever). You're welcome to create PR and fix bugs, add features etc.\n\n**Note 2**: Since I'm operating with Unix style file metadata and I don't really care about Windows implementation right now - **Windows is not supported**.\n\n**Note 3**: Git credential helpers (like `git-credential-store`, `git-credential-osxkeychain`, etc.) are **not yet supported**. You must configure authentication manually (see [here](#authentication)).\n\n## Installation\n\n### Download binary\nDownload the latest binary from the [GitHub releases page](https://github.com/unkn0wn-root/git-go/releases)\n\n### Build from Source\n\n### Prerequisites\n- Go 1.23 or later\n\n```bash\ngit clone https://github.com/unkn0wn-root/git-go.git\ncd git-go\ngo mod download\ngo build -o git-go\n```\n\n## Usage\n\n```bash\n# Initialize a new repository\n./git-go init [directory]\n\n# Check repository status\n./git-go status\n```\n\n### Staging and Committing\n```bash\n# Add files to staging area\n./git-go add \u003cfile\u003e...\n./git-go add .                    # Add all files\n./git-go add src/                 # Add directory recursively\n\n# Create commit\n./git-go commit -m \"Commit message\"\n./git-go commit -m \"Message\" --author-name \"Name\" --author-email \"hello@local.repo\"\n```\n\n### History and Inspection\n```bash\n# View commit history\n./git-go log\n./git-go log --oneline            # Condensed format\n./git-go log --max-count 10       # Limit to 10 commits\n./git-go log -n 5                 # Limit to 5 commits\n\n# Show differences\n./git-go diff                     # Working tree vs staging area\n./git-go diff --staged            # Staging area vs last commit\n./git-go diff --cached            # Alternative to --staged\n./git-go diff file.txt            # Specific file differences\n\n# Line-by-line authorship\n./git-go blame \u003cfile\u003e\n```\n\n### Reset Operations\n```bash\n# Reset modes\n./git-go reset                    # Mixed reset to HEAD\n./git-go reset --soft \u003ccommit\u003e    # Move HEAD only\n./git-go reset --mixed \u003ccommit\u003e   # Move HEAD and reset index\n./git-go reset --hard \u003ccommit\u003e    # Move HEAD, reset index and working tree\n\n# Path-specific reset\n./git-go reset \u003ccommit\u003e -- \u003cfile\u003e...\n./git-go reset HEAD -- file.txt\n```\n\n### Remote Operations (Protocol Client)\n```bash\n# Remote management\n./git-go remote add origin \u003curl\u003e\n./git-go remote list\n./git-go remote show origin\n\n# Clone repository\n./git-go clone \u003curl\u003e [directory]\n\n# Pull/Push operations\n./git-go pull [remote] [branch]\n./git-go push [remote] [branch]\n```\n\n## Authentication\n\n### GitHub Authentication\n\nFor GitHub repositories, use a Personal Access Token (PAT):\n\n```bash\n# Set your GitHub token\nexport GITHUB_TOKEN=\"your_personal_access_token\"\n\n# Then use HTTPS URLs\n./git-go clone https://github.com/username/repo.git\n./git-go push origin main\n```\n\n### GitLab Authentication\n\nFor GitLab repositories, use a Personal Access Token:\n\n```bash\n# Set your GitLab token\nexport GITLAB_TOKEN=\"your_personal_access_token\"\n\n# Then use HTTPS URLs\n./git-go clone https://gitlab.com/username/repo.git\n./git-go push origin main\n```\n\n### SSH Authentication\n\nSSH authentication is supported using:\n\n1. **SSH Agent** (recommended):\n   ```bash\n   # Start ssh-agent and add your key\n   eval $(ssh-agent -s)\n   ssh-add ~/.ssh/id_rsa\n\n   # Use SSH URLs\n   ./git-go clone git@github.com:username/repo.git\n   ```\n\n2. **Direct SSH Key**:\n   ```bash\n   # Will automatically discover keys in ~/.ssh/\n   # Supports: id_rsa, id_ed25519, id_ecdsa\n   ./git-go clone git@github.com:username/repo.git\n   ```\n\n### Basic HTTP Authentication\n\nFor repositories requiring username/password:\n\n```bash\nexport GIT_USERNAME=\"your_username\"\nexport GIT_PASSWORD=\"your_password\"\n\n./git-go clone https://superdomain.lucky/repo.git\n```\n\n### Creating Personal Access Tokens\n\n**GitHub**:\n1. Go to GitHub Settings → Developer settings → Personal access tokens\n2. Generate new token with needed permissions (repo, etc.)\n3. Copy the token and set it as `GITHUB_TOKEN`\n\n**GitLab**:\n1. Go to GitLab User Settings → Access Tokens\n2. Create new token with scopes (read_repository, write_repository, etc.)\n3. Copy the token and set it as `GITLAB_TOKEN`\n\n## Testing\n\n```bash\ngo test ./...\n\n# with coverage\ngo test -cover ./...\n```\n\n## Project Structure\n\n```\ngit-go/\n├── cmd/                   # Command-line interface definitions\n│   ├── add.go             # Add command implementation\n│   ├── blame.go           # Blame command implementation\n│   ├── clone.go           # Clone command implementation\n│   ├── commit.go          # Commit command implementation\n│   ├── diff.go            # Diff command implementation\n│   ├── init.go            # Init command implementation\n│   ├── log.go             # Log command implementation\n│   ├── pull.go            # Pull command implementation\n│   ├── push.go            # Push command implementation\n│   ├── remote.go          # Remote command implementation\n│   ├── reset.go           # Reset command implementation\n│   ├── root.go            # Root command and CLI setup\n│   └── status.go          # Status command implementation\n├── internal/              # Internal packages (not exposed to external consumers)\n│   ├── commands/          # Command implementations\n│   │   ├── add/           # Add command logic and tests\n│   │   ├── blame/         # Blame command logic and tests\n│   │   ├── clone/         # Clone command logic and tests\n│   │   ├── commit/        # Commit command logic and tests\n│   │   ├── diff/          # Diff command logic and tests\n│   │   ├── log/           # Log command logic and tests\n│   │   ├── reset/         # Reset command logic and tests\n│   │   └── status/        # Status command logic and tests\n│   ├── core/              # Core Git functionality\n│   │   ├── discovery/     # Repository discovery utilities\n│   │   ├── gitignore/     # .gitignore file parsing and matching\n│   │   ├── hash/          # SHA-1 hashing utilities\n│   │   ├── index/         # Git index (staging area) operations\n│   │   ├── objects/       # Git object parsing and manipulation\n│   │   ├── pack/          # Git pack file handling\n│   │   └── repository/    # Repository initialization and management\n│   └── transport/         # Network transport layer\n│       ├── pull/          # Pull operation implementation\n│       ├── push/          # Push operation implementation\n│       ├── remote/        # Remote repository management\n│       └── ssh/           # SSH authentication and transport\n├── pkg/                   # Public packages (can be imported by external code)\n│   ├── display/           # Output formatting and display utilities\n│   │   ├── command.go     # Command output formatting\n│   │   ├── diff.go        # Diff output formatting\n│   │   ├── display.go     # General display utilities\n│   │   ├── log.go         # Log output formatting\n│   │   └── status.go      # Status output formatting\n│   └── errors/            # Error handling and custom error types\n├── main.go                # Application entry point\n├── go.mod                 # Go module definition\n├── go.sum                 # Go module checksums\n├── Makefile               # Build and development tasks\n├── LICENSE                # Project license\n└── README.md              # Project documentation\n```\n\n## Compatibility\n\ngit-go tries to maintain full compatibility with standard Git repositories:\n- Objects created by git-go can be read by Git\n- Repositories initialized by git-go work with Git commands\n- Index files are fully (or should be) compatible between implementations\n- Reference structure follows Git conventions\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funkn0wn-root%2Fgit-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funkn0wn-root%2Fgit-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funkn0wn-root%2Fgit-go/lists"}