Registry / utility / go-git-go-git

go-git-go-git

JSON →
library4.7.0+incompatiblegogounverified

A highly extensible git implementation in pure Go.

go get github.com/go-git/go-git
INSTALL
IMPORT
SIG · GO-GIT-GO-GIT
G
go-git-go-git
utilitygov4.7.0+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

git
github.com/go-git/go-git/v5

Open an existing git repository and print the HEAD hash.

package main import ( "fmt" git "github.com/go-git/go-git/v5" ) func main() { r, err := git.PlainOpen(".") if err != nil { panic(err) } h, err := r.Head() if err != nil { panic(err) } fmt.Println(h.Hash()) }
Debug
Known issues
breakingVersion 4.x uses +incompatible; v5 is the current major version with proper Go modules support.
fix
Use github.com/go-git/go-git/v5 instead of v4.
affects: <5.0.0
Upgrade
Version history
4.7.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
go-git-go-git — go get go-git-go-git · libregistry