go-git-cmd-wrapper

module
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2017 License: Apache-2.0

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://godoc.org/github.com/ldez/go-git-cmd-wrapper"]

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://godoc.org/github.com/ldez/go-git-cmd-wrapper/git[documentation]

Directories

Path Synopsis
Package add CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package add CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package branch Branch https://git-scm.com/docs/git-branch
Package branch Branch https://git-scm.com/docs/git-branch
Package checkout CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package checkout CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package clone CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package clone CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package commit CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package commit CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
cleanup
Package cleanup --cleanup=<mode>
Package cleanup --cleanup=<mode>
untracked
Package untracked -u[<mode>], --untracked-files[=<mode>]
Package untracked -u[<mode>], --untracked-files[=<mode>]
Package config CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package config CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND
Package fetch git-fetch - Download objects and refs from another repository
Package fetch git-fetch - Download objects and refs from another repository
Package init git-init - Create an empty Git repository or reinitialize an existing one
Package init git-init - Create an empty Git repository or reinitialize an existing one
Package merge git-merge - Join two or more development histories together
Package merge git-merge - Join two or more development histories together
Package pull git-pull - Fetch from and integrate with another repository or a local branch
Package pull git-pull - Fetch from and integrate with another repository or a local branch
Package push git-push - Update remote refs along with associated objects
Package push git-push - Update remote refs along with associated objects
Package rebase git-rebase - Reapply commits on top of another base tip
Package rebase git-rebase - Reapply commits on top of another base tip
Package remote git-remote - Manage set of tracked repositories
Package remote git-remote - Manage set of tracked repositories
Package reset git-reset - Reset current HEAD to the specified state
Package reset git-reset - Reset current HEAD to the specified state
Package revparse git-rev-parse - Pick out and massage parameters
Package revparse git-rev-parse - Pick out and massage parameters

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL