external_git

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalGit

type ExternalGit struct {
	// contains filtered or unexported fields
}

func NewClonedGit

func NewClonedGit(remoteUrl string, remoteUsername string, remotePassword string, gitEmail string, gitUsername string) (*ExternalGit, error)

NewClonedGit creates a new ExternalGit from a clone

func NewGit

func NewGit(repositoryPath string) *ExternalGit

NewGit creates a new ExternalGit

func (*ExternalGit) Add

func (g *ExternalGit) Add(path string) error

Add stages untracked files

func (*ExternalGit) AddAll

func (g *ExternalGit) AddAll() error

AddAll stages all untracked files

func (*ExternalGit) Checkout

func (g *ExternalGit) Checkout(branchName string, create bool) error

Checkout checks out a branch

func (*ExternalGit) CloneOverHttp

func (g *ExternalGit) CloneOverHttp(url string, username string, password string) error

CloneOverHttp clones a Git repository using HTTP(S)

func (*ExternalGit) Commit

func (g *ExternalGit) Commit(message string) (string, error)

Commit commits all staged changes

func (*ExternalGit) Exec

func (g *ExternalGit) Exec(arg ...string) (string, error)

Exec executes git commands in the context of the repository

func (*ExternalGit) GetFilePath

func (g *ExternalGit) GetFilePath(filePath string) string

GetFilePath returns the absolute path to a file in the repository

func (*ExternalGit) GetRepositoryPath

func (g *ExternalGit) GetRepositoryPath() string

GetRepositoryPath returns the absolute path to the repository

func (*ExternalGit) HasChanges

func (g *ExternalGit) HasChanges() (bool, error)

HasChanges checks for changes in the current branch

func (*ExternalGit) Push

func (g *ExternalGit) Push(force bool) error

Push pushes the current branch to the "origin" remote

func (*ExternalGit) SetConfig

func (g *ExternalGit) SetConfig(key string, value string) error

Jump to

Keyboard shortcuts

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