Documentation ¶
Index ¶
- func GitAdd(inPath, filePath string) (string, error)
- func GitCheckout(inPath, commitOrBranch string) (string, error)
- func GitCommit(inPath, commitMsg string) (string, error)
- func GitCommitMessageFromHash(inPath, hash string) (string, error)
- func GitFetch(inPath string) (string, error)
- func GitFileDiff(inPath, previousCommit, currentCommit string) (map[string]GitChange, error)
- func GitReset(inPath, commit string) (string, error)
- func GitResolveRevision(inPath, branch string) (string, error)
- func GitResolveRoot(inPath string) (string, error)
- type GitChange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitAdd ¶
GitAdd adds a change in the working directory to the staging area see https://git-scm.com/docs/git-add for more details
func GitCheckout ¶
GitCheckout lets you navigate between the branches returns the output from git and error object if the command failed. see https://git-scm.com/docs/git-checkout for more details
func GitCommit ¶
GitCommit saves your changes to the local repository see https://git-scm.com/docs/git-commit for more details
func GitCommitMessageFromHash ¶
GitCommitMessageFromHash returns the commit message from the given commit hash see https://git-scm.com/docs/git-log for more details
func GitFileDiff ¶
GitFileDiff extracts the map of files and the action that was performed on them: added, modified or delete.
func GitResolveRevision ¶
GitResolveRevision prints the SHA1 hash given a revision specifier see https://git-scm.com/docs/git-rev-parse for more details
func GitResolveRoot ¶
GitResolveRoot finds the root of a git repo given a path see https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---show-toplevel for more details