Documentation ¶
Index ¶
- type Git
- func (g *Git) Add(files ...string) error
- func (g *Git) Checkout(branch string) error
- func (g *Git) Commit(message string, author string) error
- func (g *Git) CurrentBranch() (*string, error)
- func (g *Git) HasChanges() bool
- func (g *Git) InitIfNeeded() error
- func (g *Git) Pull() error
- func (g *Git) Push(remote, local string) error
- func (g *Git) Remove(filePath ...string) error
- func (g *Git) Version() (*int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git describes a git instance
func (*Git) CurrentBranch ¶
CurrentBranch get the current branch
func (*Git) HasChanges ¶
HasChanges does the repo have any unstaged or untracked files
func (*Git) InitIfNeeded ¶
InitIfNeeded initialize a new repo if needed
Click to show internal directories.
Click to hide internal directories.