go-git-cmd-wrapper

module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 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
git-fetch - Download objects and refs from another repository SYNOPSIS git fetch [<options>] [<repository> [<refspec>...]] git fetch [<options>] <group> git fetch --multiple [<options>] [(<repository> | <group>)...] git fetch --all [<options>] DESCRIPTION Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories.
git-fetch - Download objects and refs from another repository SYNOPSIS git fetch [<options>] [<repository> [<refspec>...]] git fetch [<options>] <group> git fetch --multiple [<options>] [(<repository> | <group>)...] git fetch --all [<options>] DESCRIPTION Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories.
git-init - Create an empty Git repository or reinitialize an existing one SYNOPSIS git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory] DESCRIPTION This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files.
git-init - Create an empty Git repository or reinitialize an existing one SYNOPSIS git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory] DESCRIPTION This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files.
git-pull - Fetch from and integrate with another repository or a local branch SYNOPSIS git pull [options] [<repository> [<refspec>...]] DESCRIPTION Incorporates changes from a remote repository into the current branch.
git-pull - Fetch from and integrate with another repository or a local branch SYNOPSIS git pull [options] [<repository> [<refspec>...]] DESCRIPTION Incorporates changes from a remote repository into the current branch.
git-push - Update remote refs along with associated objects SYNOPSIS 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>...]] DESCRIPTION Updates remote refs using local refs, while sending objects necessary to complete the given refs.
git-push - Update remote refs along with associated objects SYNOPSIS 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>...]] DESCRIPTION Updates remote refs using local refs, while sending objects necessary to complete the given refs.
git-rebase - Reapply commits on top of another base tip SYNOPSIS 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 DESCRIPTION If <branch> is specified, git rebase will perform an automatic git checkout <branch> before doing anything else.
git-rebase - Reapply commits on top of another base tip SYNOPSIS 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 DESCRIPTION If <branch> is specified, git rebase will perform an automatic git checkout <branch> before doing anything else.
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>)…​]
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