# README
= Go Git Cmd Wrapper
image:https://travis-ci.org/ldez/go-git-cmd-wrapper.svg?branch=master["Build Status", link="https://travis-ci.org/ldez/go-git-cmd-wrapper"] image:https://godoc.org/github.com/ldez/go-git-cmd-wrapper?status.svg["GoDoc", 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/Say%20Thanks-!-1EAEDB.svg["Say Thanks!", link="https://saythanks.io/to/ldez"]
It's a simple wrapper around git
command.
Import github.com/ldez/go-git-cmd-wrapper
.
[source, golang]
// clone output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg")) // with debug option output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg"), git.Debug) output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg"), 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"))
// add a remote output, err = git.Remote(remote.Add, remote.Name("upstream"), remote.URL("https://github.com/ldez/gcg"))
More examples: link:https://pkg.go.dev/github.com/ldez/go-git-cmd-wrapper/git?tab=doc[documentation]