Documentation
¶
Index ¶
- type Git
- func (g *Git) Add(pathspec string) *command.Model
- func (g *Git) Apply(patch string) *command.Model
- func (g *Git) Branch(opts ...string) *command.Model
- func (g *Git) Checkout(arg string) *command.Model
- func (g *Git) Clean(options ...string) *command.Model
- func (g *Git) Clone(repo string, opts ...string) *command.Model
- func (g *Git) CloneTagOrBranch(repo, tagOrBranch string, opts ...string) *command.Model
- func (g *Git) Commit(message string) *command.Model
- func (g *Git) Config(key string, value string, opts ...string) *command.Model
- func (g *Git) Fetch(opts ...string) *command.Model
- func (g *Git) Init() *command.Model
- func (g *Git) Log(format string, opts ...string) *command.Model
- func (g *Git) Merge(arg string) *command.Model
- func (g *Git) NewBranch(branch string) *command.Model
- func (g *Git) Pull() *command.Model
- func (g *Git) Push(branch string) *command.Model
- func (g *Git) RemoteAdd(name, url string) *command.Model
- func (g *Git) RemoteList() *command.Model
- func (g *Git) Reset(mode, commit string) *command.Model
- func (g *Git) RevList(commit string, opts ...string) *command.Model
- func (g *Git) RevParse(arg string) *command.Model
- func (g *Git) SparseCheckoutInit(cone bool) *command.Model
- func (g *Git) SparseCheckoutSet(opts ...string) *command.Model
- func (g *Git) Status(opts ...string) *command.Model
- func (g *Git) SubmoduleForeach(command *command.Model) *command.Model
- func (g *Git) SubmoduleUpdate(opts ...string) *command.Model
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 represents a Git project.
func (*Git) Add ¶
Add file contents to the index. Pathspec is the list of files to add content from. Fileglobs (e.g. *.c) can be given to add all matching files.
func (*Git) Checkout ¶
Checkout switchs branches or restore working tree files. Arg can be a commit hash, a branch or a tag.
func (*Git) CloneTagOrBranch ¶
CloneTagOrBranch is recursively clones a tag or branch.
func (*Git) Commit ¶
Commit Stores the current contents of the index in a new commit along with a log message from the user describing the changes.
func (*Git) Log ¶
Log shows the commit logs. The format parameter controls what is shown and how. Revision range can be optionally specified using the opts parameter.
func (*Git) Merge ¶
Merge joins two or more development histories together. Arg can be a commit hash, branch or tag.
func (*Git) NewBranch ¶
NewBranch creates a new branch as if git-branch were called and then check it out.
func (*Git) RemoteList ¶
RemoteList shows a list of existing remote urls with remote names.
func (*Git) Reset ¶
Reset the current branch head to commit and possibly updates the index. The mode must be one of the following: --soft, --mixed, --hard, --merge, --keep.
func (*Git) SparseCheckoutInit ¶
SparseCheckoutInit initializes the sparse-checkout config file.
func (*Git) SparseCheckoutSet ¶
SparseCheckoutSet writes the provided patterns to the sparse-checkout config file.
func (*Git) SubmoduleForeach ¶
SubmoduleForeach evaluates an arbitrary git command in each checked out submodule.