package
7.2.0+incompatible
Repository: https://github.com/jimzhan/git-town.git
Documentation: pkg.go.dev
# Functions
AddToPerennialBranches adds the given branch as a perennial branch.
ClearCurrentBranchCache clears the cache of the current branch.
CommentOutSquashCommitMessage comments out the message for the current squash merge Adds the given prefix with the newline if provided.
DeleteParentBranch removes the parent branch entry for the given branch from the Git configuration.
DoesBranchHaveUnmergedCommits returns whether the branch with the given name contains commits that are not merged into the main branch.
EnsureBranchInSync enforces that a branch with the given name is in sync with its tracking branch.
EnsureDoesNotHaveBranch enforces that a branch with the given name does not exist.
EnsureDoesNotHaveConflicts asserts that the workspace has no unresolved merge conflicts.
EnsureDoesNotHaveOpenChanges assets that the workspace has no open changes.
EnsureHasBranch enforces that a branch with the given name exists.
EnsureIsFeatureBranch asserts that the given branch is a feature branch.
EnsureIsNotMainBranch enforces that a branch with the given name is not the main branch.
EnsureIsNotPerennialBranch enforces that a branch with the given name is not a perennial branch.
EnsureIsPerennialBranch enforces that a branch with the given name is a perennial branch.
EnsureVersionRequirementSatisfied asserts that Git is the needed version or higher.
GetAncestorBranches returns the names of all parent branches for the given branch, This information is read from the cache in the Git config, so might be out of date when the branch hierarchy has been modified.
GetBranchSha returns the SHA1 of the latest commit on the branch with the given name.
GetChildBranches returns the names of all branches for which the given branch is a parent.
GetConfigurationValue returns the given configuration value, from either global or local Git configuration.
GetCurrentBranchName returns the name of the currently checked out branch.
GetCurrentSha returns the SHA of the currently checked out commit.
GetExpectedPreviouslyCheckedOutBranch returns what is the expected previously checked out branch given the inputs.
GetGlobalConfigurationValue returns the global git configuration value for the given key.
GetGlobalNewBranchPushFlag returns the global configuration for to push freshly created branches up to the origin remote.
GetLastCommitMessage returns the commit message for the last commit.
GetLocalAuthor returns the locally Git configured user.
GetLocalBranches returns the names of all branches in the local repository, ordered alphabetically.
GetLocalBranchesWithDeletedTrackingBranches returns the names of all branches whose remote tracking branches have been deleted.
GetLocalBranchesWithMainBranchFirst returns the names of all branches that exist in the local repository, ordered to have the name of the main branch first, then the names of the branches, ordered alphabetically.
GetLocalBranchesWithoutMain returns the names of all branches in the local repository, ordered alphabetically without the main branch.
GetMainBranch returns the name of the main branch.
GetParentBranch returns the name of the parent branch of the given branch.
GetParentBranchMap returns a map from branch name to its parent branch.
GetPerennialBranches returns all branches that are marked as perennial.
GetPreviouslyCheckedOutBranch returns the name of the previously checked out branch.
GetPrintableBranchTree returns a user printable branch tree.
GetPrintableMainBranch returns a user printable main branch.
GetPrintableNewBranchPushFlag returns a user printable new branch push flag.
GetPrintableOfflineFlag returns a user printable offline flag.
GetPrintablePerennialBranches returns a user printable list of perennial branches.
GetPrintablePerennialBranchTrees returns a user printable list of perennial branches trees.
GetPullBranchStrategy returns the currently configured pull branch strategy.
GetRemoteOriginURL returns the URL for the "origin" remote.
GetRemoteUpstreamURL returns the URL of the "upstream" remote.
GetRootDirectory returns the path of the rood directory of the current repository, i.e.
GetTrackingBranchName returns the name of the remote branch that corresponds to the local branch with the given name.
GetURLHostname returns the hostname contained within the given Git URL.
GetURLRepositoryName returns the repository name contains within the given Git URL.
HasBranch returns whether the repository contains a branch with the given name.
HasConflicts returns whether the local repository currently has unresolved merge conflicts.
HasGlobalConfigurationValue returns whether there is a global git configuration for the given key.
HasLocalBranch returns whether the local repository contains a branch with the given name.
HasOpenChanges returns whether the local repository contains uncommitted changes.
HasParentBranch returns whether or not the given branch has a parent.
HasRemote returns whether the current repository contains a Git remote with the given name.
HasShippableChanges returns whether the supplied branch has an changes not currently on the main branchName.
HasTrackingBranch returns whether the local branch with the given name has a tracking branch.
IsAncestorBranch returns whether the given branch is an ancestor of the other given branch.
IsBranchInSync returns whether the branch with the given name is in sync with its tracking branch.
IsFeatureBranch returns whether the branch with the given name is a feature branch.
IsMainBranch returns whether the branch with the given name is the main branch of the repository.
IsMergeInProgress returns whether the local repository is in the middle of an unfinished merge process.
IsOffline returns whether Git Town is currently in offline mode.
IsPerennialBranch returns whether the branch with the given name is a perennial branch.
IsRebaseInProgress returns whether the local repository is in the middle of an unfinished rebase process.
IsRepository returns whether or not the current directory is in a repository.
NewConfigMap returns a new config map.
RemoveAllConfiguration removes all Git Town configuration.
RemoveFromPerennialBranches removes the given branch as a perennial branch.
RemoveOutdatedConfiguration removes outdated Git Town configuration.
SetMainBranch marks the given branch as the main branch in the Git Town configuration.
SetParentBranch marks the given branch as the direct parent of the other given branch in the Git Town configuration.
SetPerennialBranches marks the given branches as perennial branches.
SetPullBranchStrategy updates the configured pull branch strategy.
ShouldBranchBePushed returns whether the local branch with the given name contains commits that have not been pushed to the remote.
ShouldNewBranchPush returns whether the current repository is configured to push freshly created branches up to the origin remote.
UpdateCurrentBranchCache clears the cache of the current branch.
UpdateGlobalShouldNewBranchPush updates global whether to push freshly created branches up to the origin remote.
UpdateOffline updates whether Git Town is in offline mode.
UpdateShouldNewBranchPush updates whether the current repository is configured to push freshly created branches up to the origin remote.
ValidateIsOnline asserts that Git Town is not in offline mode.
ValidateIsRepository asserts that the current directory is in a repository.