go-git-cmd-wrapper

module
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2017 License: Apache-2.0

README

= 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>...
Checkout https://git-scm.com/docs/git-checkout git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch>] git checkout [-q] [-f] [-m] [--detach] <commit> git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>…​ git checkout [-p|--patch] [<tree-ish>] [--] [<paths>…​] --quiet --[no-]progress --force --ours --theirs -b <new_branch> -B <new_branch> --track --no-track -l --detach --orphan <new_branch> --ignore-skip-worktree-bits --merge --conflict=<style> --patch --ignore-other-worktrees --[no-]recurse-submodules <branch> <new_branch> <start_point> <tree-ish>
Checkout https://git-scm.com/docs/git-checkout git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch>] git checkout [-q] [-f] [-m] [--detach] <commit> git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>] git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>…​ git checkout [-p|--patch] [<tree-ish>] [--] [<paths>…​] --quiet --[no-]progress --force --ours --theirs -b <new_branch> -B <new_branch> --track --no-track -l --detach --orphan <new_branch> --ignore-skip-worktree-bits --merge --conflict=<style> --patch --ignore-other-worktrees --[no-]recurse-submodules <branch> <new_branch> <start_point> <tree-ish>
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
* CODE GENERATED AUTOMATICALLY * THIS FILE MUST NOT BE EDITED BY HAND
Config https://git-scm.com/docs/git-config
Config https://git-scm.com/docs/git-config
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 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