Categorygithub.com/ldez/go-git-cmd-wrapper
module
0.22.0
Repository: https://github.com/ldez/go-git-cmd-wrapper.git
Documentation: pkg.go.dev

# 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]

# Packages

Package add git-add - Add file contents to the index SYNOPSIS git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]] [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--chmod=(+|-)x] [--] [<pathspec>...] DESCRIPTION This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit.
Package branch 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>..
Package checkout git-checkout - Switch branches or restore working tree files SYNOPSIS 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>..
Package clone git-clone - Clone a repository into a new directory SYNOPSIS 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>] DESCRIPTION Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch -r), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.
Package commit git-commit - Record changes to the repository SYNOPSIS git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>] [--date=<date>] [--cleanup=<mode>] [--[no-]status] [-i | -o] [-S[<keyid>]] [--] [<file>...] DESCRIPTION Stores the current contents of the index in a new commit along with a log message from the user describing the changes.
Package config git-config - Get and set repository or global options SYNOPSIS git config [<file-option>] [type] [--show-origin] [-z|--null] name [value [value_regex]] git config [<file-option>] [type] --add name value git config [<file-option>] [type] --replace-all name value [value_regex] git config [<file-option>] [type] [--show-origin] [-z|--null] --get name [value_regex] git config [<file-option>] [type] [--show-origin] [-z|--null] --get-all name [value_regex] git config [<file-option>] [type] [--show-origin] [-z|--null] [--name-only] --get-regexp name_regex [value_regex] git config [<file-option>] [type] [-z|--null] --get-urlmatch name URL git config [<file-option>] --unset name [value_regex] git config [<file-option>] --unset-all name [value_regex] git config [<file-option>] --rename-section old_name new_name git config [<file-option>] --remove-section name git config [<file-option>] [--show-origin] [-z|--null] [--name-only] -l | --list git config [<file-option>] --get-color name [default] git config [<file-option>] --get-colorbool name [stdout-is-tty] git config [<file-option>] -e | --edit DESCRIPTION You can query/set/replace/unset options with this command.
Package fetch CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
No description provided by the author
Package init CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package merge CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package pull CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package push CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package rebase CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package remote git-remote - Manage set of tracked repositories SYNOPSIS 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>..
Package reset CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
Package revparse CODE GENERATED AUTOMATICALLY THIS FILE MUST NOT BE EDITED BY HAND */.
No description provided by the author
Package worktree git-worktree - Manage multiple working trees SYNOPSIS git worktree add [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>] git worktree list [--porcelain] git worktree lock [--reason <string>] <worktree> git worktree prune [-n] [-v] [--expire <expire>] git worktree unlock <worktree> DESCRIPTION Manage multiple working trees attached to the same repository.