Versions in this module Expand all Collapse all v0 v0.3.0 Nov 1, 2023 Changes in this version + func AddAll(path string) error + func AddIndexPath(w git.Worktree, path string) error + func AddRemote(path string, name string, url string) error + func CheckIfBranchExists(path string, branchName string) (bool, error) + func CheckoutBranch(path string, branchName string) error + func CheckoutCommit(path string, commitHash string) error + func Clone(repo string, path string, oldCommitSave bool) error + func CloneWithAuth(repo string, path string, username string, password string, oldCommitSave bool) error + func CreateBranch(path string, branchName string) error + func DeleteBranch(path string, branchName string) error + func EditorGetText(editor string, defaultText string, wd string, fileTitle string) (string, error) + func GetCommitByHash(path string, hash string) (object.Commit, error) + func GetConfigEditor() (string, error) + func GetCurrentBranch(path string) (string, error) + func GetGitURL(path string) (string, error) + func GetHeadHash(path string) (string, error) + func GetUserConfig(path string) (string, string, error) + func GitAddAll() error + func GitCheckoutFileHead(file string) error + func GitCommitAmend(message string) error + func GitCommitAmendNoEdit() error + func GitConfigPullRebaseTrueOnlyIfNotSet() error + func GitDeleteRemoteBranch(remote string, branch string) error + func GitDiffIndexCommit(commit string) (bool, error) + func GitDiffIndexHead() (bool, error) + func GitDiffRef(ref1 string, ref2 string) (bool, error) + func GitFetchAll() error + func GitPull(username string, password string, remote string) error + func GitPullRebase(username string, password string, remote string) error + func GitRemoteContainsHash(hash string) bool + func GitRemoveAll() error + func GitResetAllHead() error + func GitRevert(commitID string) error + func GitRmCached() error + func GitStash() error + func GitStashPop() error + func Init(path string) error + func IsDetachedHead(path string) (bool, error) + func IsGitInstalled() bool + func IsPathGitRepo(path string) bool + func IsWorkTreeClean(path string) (bool, error) + func ListAllCommits(path string) ([]object.Commit, error) + func ListBranches(path string) ([]string, error) + func ListCommit(path string) ([]object.Commit, error) + func OpenRepo(path string) (*git.Repository, error) + func Pull(path string, remote string, username string, password string) error + func Push(path string, remote string, username string, password string) error + func RemoteExists(path string, name string) (bool, error) + func RemoveAll(path string) error + func RemoveRemote(path string, name string) error + func SetUserConfig(path string, name string, email string) error + func SoftReset(path string, commit object.Commit) error + type CommitResult struct + FilesAdded int + FilesDeleted int + FilesUpdated int + Hash string + func Commit(path string, message string, file []string) (CommitResult, error) + type FileStatus struct + Path string + Status string + func GetStatus(path string) ([]FileStatus, error) + type Remote struct + Name string + Url string + func ListRemote(path string) ([]Remote, error)