Skip to content

A library that wraps git commands and returns structured output

Notifications You must be signed in to change notification settings

instruqt/git-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 {}
}

About

A library that wraps git commands and returns structured output

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages