Documentation
¶
Index ¶
- type Git
- func (g *Git) Add(ctx context.Context, files ...string) error
- func (g *Git) Cmd(ctx context.Context, name string, args ...string) error
- func (g *Git) Commit(ctx context.Context, msg string) error
- func (g *Git) ConfigGet(ctx context.Context, key string) (string, error)
- func (g *Git) ConfigSet(ctx context.Context, key, value string) error
- func (g *Git) HasStagedChanges(ctx context.Context) bool
- func (g *Git) Init(ctx context.Context, signKey, userName, userEmail string) error
- func (g *Git) InitConfig(ctx context.Context, signKey, userName, userEmail string) error
- func (g *Git) IsInitialized() bool
- func (g *Git) Pull(ctx context.Context, remote, branch string) error
- func (g *Git) Push(ctx context.Context, remote, branch string) error
- func (g *Git) PushPull(ctx context.Context, op, remote, branch string) error
- func (g *Git) SetSignKey(ctx context.Context, sk string) error
- func (g *Git) Version(ctx context.Context) semver.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git is a cli based git backend
func (*Git) HasStagedChanges ¶
HasStagedChanges returns true if there are any staged changes which can be committed
func (*Git) InitConfig ¶
InitConfig initialized and preparse the git config
func (*Git) IsInitialized ¶
IsInitialized returns true if this stores has an (probably) initialized .git folder
func (*Git) PushPull ¶
PushPull pushes the repo to it's origin. optional arguments: remote and branch
func (*Git) SetSignKey ¶
SetSignKey configures git to use the given sign key
Click to show internal directories.
Click to hide internal directories.