Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone(dir string, opts CloneOptions) error
Clone clones a git Repository with the given options
Types ¶
type CloneOptions ¶
type CloneOptions git.CloneOptions
CloneOptions are used when cloning a git Repository
type Config ¶
type Config struct { User struct { Name string `ini:"name"` Email string `ini:"email"` } `ini:"user"` }
func OpenGitConfig ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func Initiate ¶
func Initiate(dir string) (Repository, error)
Initiate starts a new git Repository with the given options
func (*Repository) Commit ¶
func (r *Repository) Commit(msg, addPattern, author, email string) (err error)
Commit mark a commit on the current Repository
func (*Repository) RenameBranch ¶
func (r *Repository) RenameBranch() error
RenameBranch Change the default branch on the current Repository to use "main"
func (*Repository) SetRemote ¶
func (r *Repository) SetRemote(remoteAddr string) (err error)
SetRemote defines a new remote for the Repository
Click to show internal directories.
Click to hide internal directories.