{"id":36794511,"url":"https://github.com/gg-scm/gg-git","last_synced_at":"2026-01-12T13:28:58.192Z","repository":{"id":42037163,"uuid":"287313664","full_name":"gg-scm/gg-git","owner":"gg-scm","description":"A high-level interface for interacting with a Git subprocess in Go","archived":false,"fork":false,"pushed_at":"2024-11-03T02:14:38.000Z","size":438,"stargazers_count":23,"open_issues_count":14,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-03T01:23:27.186Z","etag":null,"topics":["git","golang","library","package","subprocess","version-control"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/gg-scm.io/pkg/git","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gg-scm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"zombiezen"}},"created_at":"2020-08-13T15:18:43.000Z","updated_at":"2024-11-03T15:59:36.000Z","dependencies_parsed_at":"2024-06-19T19:08:22.188Z","dependency_job_id":null,"html_url":"https://github.com/gg-scm/gg-git","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/gg-scm/gg-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gg-scm%2Fgg-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gg-scm%2Fgg-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gg-scm%2Fgg-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gg-scm%2Fgg-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gg-scm","download_url":"https://codeload.github.com/gg-scm/gg-git/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gg-scm%2Fgg-git/sbom","scorecard":{"id":425117,"data":{"date":"2025-08-11","repo":{"name":"github.com/gg-scm/gg-git","commit":"88acd3e0c22c36c42ff337d80df2b7d8442fbf7b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: found token with 'none' permissions: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/gg-scm/gg-git/build.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T02:04:42.494Z","repository_id":42037163,"created_at":"2025-08-19T02:04:42.494Z","updated_at":"2025-08-19T02:04:42.494Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28339092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git","golang","library","package","subprocess","version-control"],"created_at":"2026-01-12T13:28:58.098Z","updated_at":"2026-01-12T13:28:58.178Z","avatar_url":"https://github.com/gg-scm.png","language":"Go","funding_links":["https://github.com/sponsors/zombiezen"],"categories":[],"sub_categories":[],"readme":"# `gg-scm.io/pkg/git`\n\n[![Reference](https://pkg.go.dev/badge/gg-scm.io/pkg/git)](https://pkg.go.dev/gg-scm.io/pkg/git)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n`gg-scm.io/pkg/git` provides a high-level interface for interacting with a\n[Git][] subprocess in Go. It was developed for [gg][], but this library is\nuseful for any program that wishes to interact with a Git repository.\n`gg-scm.io/pkg/git` lets your Go program read information from commit history,\ncreate new commits, and do anything else you can do from the Git CLI.\n\n[Git]: https://git-scm.com/\n[gg]: https://gg-scm.io/\n\n## Installation\n\nInside your Go project, run:\n\n```\ngo get gg-scm.io/pkg/git\n```\n\n## Usage\n\n```go\n// Find the Git executable.\ng, err := git.New(git.Options{})\nif err != nil {\n  return err\n}\n\n// Write a file and track it with `git add`.\nerr = os.WriteFile(\"foo.txt\", []byte(\"Hello, World!\\n\"), 0o666)\nif err != nil {\n  return err\n}\nerr = g.Add(ctx, []git.Pathspec{git.LiteralPath(\"foo.txt\")}, git.AddOptions{})\nif err != nil {\n  return err\n}\n\n// Create a new commit.\nerr = g.Commit(ctx, \"Added foo.txt with a greeting\", git.CommitOptions{})\nif err != nil {\n  return err\n}\n```\n\nSee more examples [on pkg.go.dev](https://pkg.go.dev/gg-scm.io/pkg/git#pkg-examples).\n\nThis library is tested against Git 2.17.1 and newer. Older versions may work,\nbut are not supported.\n\n## Support\n\nIf you've found an issue, file it on the [issue tracker][].\n\n[issue tracker]: https://github.com/gg-scm/gg-git/issues\n\n## Motivation\n\nAs [noted in the Git book][Embedding Git], shelling out to Git has the benefit\nof using the canonical implementation of Git and having all of its features.\nHowever, as the book notes, trying to interact with a Git subprocess requires\n\"pars\\[ing] Git's occasionally-changing output format to read progress and result\ninformation, which can be inefficient and error-prone.\" This package handles all\nthose details for you. Common operations like `git commit` or `git rev-parse`\nare wrapped as functions that take in Go data structures as input and return\nGo data structures as output. These are methods are tested to be robust over\nmany different versions of Git under different scenarios. For less common\noperations, you can [invoke Git][] with exactly the same command line arguments\nyou would use interactively and `gg-scm.io/pkg/git` will handle finding Git and\ncollecting error messages for you. All Git subprocess invocations can be\n[logged][LogHook] for easy debugging.\n\nThe goals of `gg-scm.io/pkg/git` are different from those of go-git. go-git\naims to be a reimplementation of Git in pure Go. go-git avoids the dependency\non the Git CLI, but as a result, go-git does not have the same feature set as\nupstream Git and introduces the potential for discrepancies in\nimplementation. `gg-scm.io/pkg/git` is intended for scenarios where the\nfidelity of interactions with Git matters.\n\n[Embedding Git]: https://git-scm.com/book/en/v2/Appendix-B%3A-Embedding-Git-in-your-Applications-Command-line-Git\n[invoke Git]: https://pkg.go.dev/gg-scm.io/pkg/git#Git.Run\n[LogHook]: https://pkg.go.dev/gg-scm.io/pkg/git#Options.LogHook\n\n## Stability\n\nThe following packages are stable and we make a reasonable effort to avoid\nbackward-incompatible changes:\n\n-  `gg-scm.io/pkg/git`\n-  `gg-scm.io/pkg/git/githash`\n\nThe following packages are relatively new and may still make breaking changes:\n\n-  `gg-scm.io/pkg/git/object`\n-  `gg-scm.io/pkg/git/packfile`\n-  `gg-scm.io/pkg/git/packfile/client`\n\nBecause we still have some packages in early development, we have kept the\nentire repository on major version 0. When all packages are stable, we will\nstart using major version 1.\n\n## Contributing\n\nWe'd love to accept your patches and contributions to this project.\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details.\n\nIf you find this package useful, consider [sponsoring @zombiezen][],\nthe author and maintainer.\n\n[sponsoring @zombiezen]: https://github.com/sponsors/zombiezen\n\n## Links\n\n-  [gg website](https://gg-scm.io/)\n-  [Sponsor](https://github.com/sponsors/zombiezen)\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgg-scm%2Fgg-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgg-scm%2Fgg-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgg-scm%2Fgg-git/lists"}