go-git-cmd-wrapper

module
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 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/ldez/go-git-cmd-wrapper.svg?status.svg["GoDoc", link="https://godoc.org/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
Branch https://git-scm.com/docs/git-branch usage: git branch [<options>] [-r | -a] [--merged | --no-merged] or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>] or: git branch [<options>] [-r] (-d | -D) <branch-name>...
Branch https://git-scm.com/docs/git-branch usage: git branch [<options>] [-r | -a] [--merged | --no-merged] or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>] or: git branch [<options>] [-r] (-d | -D) <branch-name>...
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
cleanup
--cleanup=<mode> This option determines how the supplied commit message should be cleaned up before committing.
--cleanup=<mode> This option determines how the supplied commit message should be cleaned up before committing.
untracked
-u[<mode>], --untracked-files[=<mode>] The mode parameter is optional (defaults to all), and is used to specify the handling of untracked files; when -u is not used, the default is normal, i.e.
-u[<mode>], --untracked-files[=<mode>] The mode parameter is optional (defaults to all), and is used to specify the handling of untracked files; when -u is not used, the default is normal, i.e.
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
git-fetch - Download objects and refs from another repository
git-fetch - Download objects and refs from another repository
git-init - Create an empty Git repository or reinitialize an existing one
git-init - Create an empty Git repository or reinitialize an existing one
git-pull - Fetch from and integrate with another repository or a local branch
git-pull - Fetch from and integrate with another repository or a local branch
git-push - Update remote refs along with associated objects
git-push - Update remote refs along with associated objects
git-rebase - Reapply commits on top of another base tip
git-rebase - Reapply commits on top of another base tip
git-remote - Manage set of tracked repositories
git-remote - Manage set of tracked repositories
git-reset - Reset current HEAD to the specified state
git-reset - Reset current HEAD to the specified state
git rev-parse [ --option ] <args>...
git rev-parse [ --option ] <args>...

Jump to

Keyboard shortcuts

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