Affected by GO-2025-3367
and 4 other vulnerabilities
GO-2025-3367: Clients vulnerable to DoS via maliciously crafted Git server replies in github.com/go-git/go-git
GO-2025-3368: Argument Injection via the URL field in github.com/go-git/go-git
GO-2026-4473: Improper verification of data integrity values for .idx and .pack files in github.com/go-git/go-git
GO-2026-4909: Missing validation decoding Index v4 files leads to panic in github.com/go-git/go-git
GO-2026-4910: Maliciously crafted idx file can cause asymmetric memory consumption in github.com/go-git/go-git

The highest tagged major version is
v6.
package
Version:
v5.4.0
Opens a new window with list of versions in this module.
Published: May 12, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 303
Opens a new window with list of known importers.
README
¶
go-git: examples
Here you can find a list of annotated go-git examples:
Basic
- showcase - A small showcase of the capabilities of go-git.
- open - Opening a existing repository cloned by git.
- clone - Cloning a repository.
- commit - Commit changes to the current branch to an existent repository.
- push - Push repository to default remote (origin).
- pull - Pull changes from a remote repository.
- checkout - Check out a specific commit from a repository.
- log - Emulate
git log command output iterating all the commit history from HEAD reference.
- branch - How to create and remove branches or any other kind of reference.
- tag - List/print repository tags.
- tag create and push - Create and push a new tag.
- remotes - Working with remotes: adding, removing, etc.
- progress - Printing the progress information from the sideband.
- revision - Solve a revision into a commit.
- config - Explains how to work with config files.
- submodule - Submodule update remote.
Advanced
Documentation
¶
CheckArgs should be used to ensure the right command line arguments are
passed before executing an example.
func CheckIfError(err error)
CheckIfError should be used to naively panics if an error is not nil.
func Info(format string, args ...interface{})
Info should be used to describe the example commands that are about to run.
func Warning(format string, args ...interface{})
Warning should be used to display a warning
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.