Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRootDir ¶
GetRootDir returns the root directory of the git repository
func IsGitRepository ¶
IsGitRepository returns true if the directory is a Git repository
Types ¶
type Repository ¶
type Repository struct {
Repository *git.Repository
}
Repository repo handle
func NewRepository ¶
func NewRepository(dir string) (*Repository, error)
NewRepository returns the repository handle
func (*Repository) CreateAnnotatedTag ¶ added in v1.2.0
func (r *Repository) CreateAnnotatedTag(tag, message string) error
CreateAnnotatedTag creates an annotated tag
func (*Repository) CreateLightweightTag ¶ added in v1.2.0
func (r *Repository) CreateLightweightTag(tag string) error
CreateLightweightTag creates an lightweight tag
func (*Repository) GetTags ¶
func (r *Repository) GetTags() []string
GetTags returns a list of git tags
func (*Repository) HasUncommitedChanges ¶ added in v1.4.0
func (r *Repository) HasUncommitedChanges() bool
HasUncommitedChanges returns true if the git index is clean
func (*Repository) PushTags ¶
func (r *Repository) PushTags(remote string) error
PushTags pushes to the specified remotre
Click to show internal directories.
Click to hide internal directories.