Categorygithub.com/ldez/go-git-cmd-wrapper/v2
modulepackage
2.8.0
Repository: https://github.com/ldez/go-git-cmd-wrapper.git
Documentation: pkg.go.dev

# README

Go Git Cmd Wrapper

Build Status PkgGoDev Go Report Card

Sponsor

It's a simple wrapper around git command.

Import github.com/ldez/go-git-cmd-wrapper/v2/git.

// clone
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"))
// with debug option
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), git.Debug)
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), 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/prm"))

More examples: Documentation

# Packages

Package add git-add - Add file contents to the index.
Package branch git-branch - List, create, or delete branches.
Package checkout git-checkout - Switch branches or restore working tree files.
Package clone git-clone - Clone a repository into a new directory.
Package commit git-commit - Record changes to the repository.
Package config git-config - Get and set repository or global options.
Package fetch git-fetch - Download objects and refs from another repository.
Package git Main package of the git commands.
Package init git-init - Create an empty Git repository or reinitialize an existing one.
Package lsfiles git-ls-files - Show information about files in the index and the working tree.
Package merge git-merge - Join two or more development histories together.
Package notes git-notes - Add or inspect object notes.
Package pull git-pull - Fetch from and integrate with another repository or a local branch.
Package push git-push - Update remote refs along with associated objects.
Package rebase git-rebase - Reapply commits on top of another base tip.
Package remote git-remote - Manage set of tracked repositories.
Package reset git-reset - Reset current HEAD to the specified state.
Package revparse git-rev-parse - Pick out and massage parameters.
Package stash git-stash - Stash the changes in a dirty working directory away.
Package status git-status - Show the working tree status # SYNOPSIS Reference: https://git-scm.com/docs/git-status git status [<options>...] [--] [<pathspec>...] # DESCRIPTION Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by gitignore(5)).
Package tag git-tag - git-tag - Create, list, delete or verify a tag object signed with GPG.
No description provided by the author
Package worktree git-worktree - Manage multiple working trees.