go-git-cmd-wrapper

module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 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>
Clone https://git-scm.com/docs/git-clone git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] [--dissociate] [--separate-git-dir <git dir>] [--depth <depth>] [--[no-]single-branch] [--recurse-submodules] [--[no-]shallow-submodules] [--jobs <n>] [--] <repository> [<directory>]
Clone https://git-scm.com/docs/git-clone git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] [--dissociate] [--separate-git-dir <git dir>] [--depth <depth>] [--[no-]single-branch] [--recurse-submodules] [--[no-]shallow-submodules] [--jobs <n>] [--] <repository> [<directory>]
Config https://git-scm.com/docs/git-config
Config https://git-scm.com/docs/git-config
Fetch https://git-scm.com/docs/git-fetch git fetch [<options>] [<repository> [<refspec>…​]] git fetch [<options>] <group> git fetch --multiple [<options>] [(<repository> | <group>)…​] git fetch --all [<options>] --all --append --depth=<depth> --deepen=<depth> --shallow-since=<date> --shallow-exclude=<revision> --unshallow --update-shallow --dry-run --force --keep --multiple --prune --no-tags --refmap=<refspec> --tags --recurse-submodules[=yes|on-demand|no] --jobs=<n> --no-recurse-submodules --submodule-prefix=<path> --recurse-submodules-default=[yes|on-demand] --update-head-ok --upload-pack <upload-pack> --quiet --verbose --progress --ipv4 --ipv6 <repository> <group> <refspec>
Fetch https://git-scm.com/docs/git-fetch git fetch [<options>] [<repository> [<refspec>…​]] git fetch [<options>] <group> git fetch --multiple [<options>] [(<repository> | <group>)…​] git fetch --all [<options>] --all --append --depth=<depth> --deepen=<depth> --shallow-since=<date> --shallow-exclude=<revision> --unshallow --update-shallow --dry-run --force --keep --multiple --prune --no-tags --refmap=<refspec> --tags --recurse-submodules[=yes|on-demand|no] --jobs=<n> --no-recurse-submodules --submodule-prefix=<path> --recurse-submodules-default=[yes|on-demand] --update-head-ok --upload-pack <upload-pack> --quiet --verbose --progress --ipv4 --ipv6 <repository> <group> <refspec>
Init https://git-scm.com/docs/git-init git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory]
Init https://git-scm.com/docs/git-init git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory]
Push https://git-scm.com/docs/git-push git push [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose] [-u | --set-upstream] [--push-option=<string>] [--[no-]signed|--sign=(true|false|if-asked)] [--force-with-lease[=<refname>[:<expect>]]] [--no-verify] [<repository> [<refspec>...]]
Push https://git-scm.com/docs/git-push git push [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose] [-u | --set-upstream] [--push-option=<string>] [--[no-]signed|--sign=(true|false|if-asked)] [--force-with-lease[=<refname>[:<expect>]]] [--no-verify] [<repository> [<refspec>...]]
Rebase https://git-scm.com/docs/git-rebase git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]] git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] git rebase --continue | --skip | --abort | --quit | --edit-todo --onto <newbase> <upstream> <branch> --continue --abort --quit --keep-empty --skip --edit-todo --merge --strategy=<strategy> --strategy-option=<strategy-option> --gpg-sign[=<keyid>] --quiet --verbose --stat --no-stat --no-verify --verify -C<n> --force-rebase --fork-point --no-fork-point --ignore-whitespace --whitespace=<option> --committer-date-is-author-date --ignore-date --signoff --interactive --preserve-merges -x <cmd> --exec <cmd> --root --autosquash --no-autosquash --autostash --no-autostash --no-ff
Rebase https://git-scm.com/docs/git-rebase git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]] git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] git rebase --continue | --skip | --abort | --quit | --edit-todo --onto <newbase> <upstream> <branch> --continue --abort --quit --keep-empty --skip --edit-todo --merge --strategy=<strategy> --strategy-option=<strategy-option> --gpg-sign[=<keyid>] --quiet --verbose --stat --no-stat --no-verify --verify -C<n> --force-rebase --fork-point --no-fork-point --ignore-whitespace --whitespace=<option> --committer-date-is-author-date --ignore-date --signoff --interactive --preserve-merges -x <cmd> --exec <cmd> --root --autosquash --no-autosquash --autostash --no-autostash --no-ff
Remote https://git-scm.com/docs/git-remote git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remote set-head <name> (-a | --auto | -d | --delete | <branch>) git remote set-branches [--add] <name> <branch>…​ git remote get-url [--push] [--all] <name> git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url> git remote [-v | --verbose] show [-n] <name>…​ git remote prune [-n | --dry-run] <name>…​ git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)…​]
Remote https://git-scm.com/docs/git-remote git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remote set-head <name> (-a | --auto | -d | --delete | <branch>) git remote set-branches [--add] <name> <branch>…​ git remote get-url [--push] [--all] <name> git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url> git remote [-v | --verbose] show [-n] <name>…​ git remote prune [-n | --dry-run] <name>…​ git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)…​]

Jump to

Keyboard shortcuts

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