Documentation
¶
Index ¶
- Variables
- func AddOrCreateBranchToWorkSpace(repoDir string, targetPath string, branchName string, baseBranchName string) ([]byte, error)
- func BranchExist(branchName string, repoDir string) bool
- func CheckUncommittedChanges(repoDir string) error
- func FetchBranch(repoDir, branchName string) ([]byte, error)
- func GetCurrentBranch(repoDir string) (string, error)
- func GetDefaultBranch(repoDir string) (string, error)
- func PullFastForward(repoDir, branchName string) ([]byte, error)
- func RemoveFromWorkSpace(repoDir string, targetPath string, force bool) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUncommittedChanges = errors.New("uncommitted changes exist in the repository")
Functions ¶
func BranchExist ¶
func CheckUncommittedChanges ¶
CheckUncommittedChanges returns ErrUncommittedChanges if there are uncommitted changes
func FetchBranch ¶
FetchBranch updates a local branch from origin without checking it out
func GetCurrentBranch ¶
GetCurrentBranch returns the name of the currently checked out branch
func GetDefaultBranch ¶
GetDefaultBranch returns the default branch name of the remote origin (e.g., master or main)
func PullFastForward ¶
PullFastForward updates the current branch using fast-forward only
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.