gogit

command module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 4 Imported by: 0

README

Builds Go Report Card GoDoc

gogit

Implementation of git internal commands in Go language.

This project is part of a learning exercise to implement a subset of "git" commands. It can be used to create and maintain git objects, such as blobs, trees, commits, references and tags.

demo

Video with explanation

This video is a supplemental tech-talk recording explaining the internals of "git" (Delievered at Nutanix, Inc, 2020)

tech-talk

Supported commands

gogit - the stupid content tracker

usage: gogit <command> [<args>]
Valid commands:
  init           Create an empty Git repository
  hash-object    Compute object ID and optionally creates a blob from a file
  cat-file       Provide content or type and size information for repository objects
  ls-tree        List the contents of a tree object
  mktree         Build a tree-object from ls-tree formatted text
  checkout       restore working tree files
  commit-tree    Create a new commit object
  log            Shows the commit logs
  show-ref       List references in a local repository
  update-ref     Update the object name stored in a ref safely
  rev-parse      Parse a given git identifier

Use "gogit <command> --help" for help on a specific command

Installation

go get github.com/ssrathi/gogit

Contributing

Contributions are most welcome! Please create a new issue and link your PR to it.

Documentation

Overview

Implementation of git internal commands in Go language.

This project is part of a learning exercise to implement a subset of "git" commands. It can be used to create and maintain git objects, such as blobs, trees, commits, branches and tags.

Code Organization

  • "git": internal git objects and related APIs.
  • "cmd": Command line parsing and execution.
  • "util": Miscellaneous utility APIs.

Directories

Path Synopsis
Package cmd is the entry point for gogit command line parsing.
Package cmd is the entry point for gogit command line parsing.
Package git implements internal git objects and related APIs.
Package git implements internal git objects and related APIs.
Package util implements miscellaneous utility APIs.
Package util implements miscellaneous utility APIs.

Jump to

Keyboard shortcuts

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