ldez / Go Git Cmd Wrapper
Labels
Projects that are alternatives of or similar to Go Git Cmd Wrapper
= Go Git Cmd Wrapper
image:https://github.com/ldez/go-git-cmd-wrapper/workflows/Main/badge.svg?branch=master["Build Status", link="https://github.com/ldez/go-git-cmd-wrapper/actions"] image:https://pkg.go.dev/badge/github.com/ldez/go-git-cmd-wrapper["PkgGoDev", link="https://pkg.go.dev/github.com/ldez/go-git-cmd-wrapper"] image:https://goreportcard.com/badge/github.com/ldez/go-git-cmd-wrapper["Go Report Card", link="https://goreportcard.com/report/github.com/ldez/go-git-cmd-wrapper"]
image:https://img.shields.io/badge/Sponsor%20me-%E2%9D%A4%EF%B8%8F-pink.svg["Sponsor", link="https://github.com/sponsors/ldez"]
It's a simple wrapper around git
command.
Import github.com/ldez/go-git-cmd-wrapper/v2/git
.
[source, golang]
// clone output, err := git.Clone(clone.Repository("https://github.com/ldez/prm")) // with debug option output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), git.Debug) output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), git.Debugger(true))
// fetch output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream")) output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream"), fetch.RefSpec("master"))
https://github.com/ldez/prm"))
// add a remote output, err = git.Remote(remote.Add, remote.Name("upstream"), remote.URL("More examples: link:https://pkg.go.dev/github.com/ldez/go-git-cmd-wrapper/v2/git?tab=doc[Documentation]