Categorygithub.com/instruqt/git-exec
repositorypackage
0.0.0-20241113215725-ecf0e42fa440
Repository: https://github.com/instruqt/git-exec.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Git Exec

A library that wraps git commands and returns structured output.

Example Usage

Install using standard go get:

go get github.com/instruqt/git-exec

Use in your project:

package main

import (
  ge "github.com/instruqt/git-exec"
)

func main() {
  git, err := ge.New()
  if err != nil {}

  message, err := git.Init()
  if err != nil {}

  fmt.Println(message)

  err = os.WriteFile("file.txt", []byte("Hello, World!"), 0644)
  if err != nil {}

  err = git.Add("file.txt")
  if err != nil {}

  files, err := git.Status()
  if err != nil {}

  fmt.Printf("%#v", files)

  err = git.Commit("Initial commit", "Name", "[email protected]")
  if err != nil {}
}