gitcmd

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 35 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitCommands = &gcli.Command{
	Name:    "git",
	Desc:    "tools for quick use `git` and more extra commands",
	Aliases: []string{"g", "gitx"},
	Subs: []*gcli.Command{
		NewRepoInfoCmd(),

		NewRemoteInfoCmd(),
		NewPullRequestCmd(),
		NewCloneCmd(configProvider),
		NewAddCommitPush(),
		NewAddCommitCmd(),
		NewUpdateCmd(),
		NewUpdatePushCmd(),
		NewOpenRemoteCmd(configProvider),
		NewInitFlowCmd(),
		NewCheckoutCmd(),
		NewShowLogCmd(),
		NewChangelogCmd(),
		NewTagCmd(),
		NewBatchCmd(),
		NewBranchCmd(),
		NewGitEmojisCmd(),
	},
	Config: func(c *gcli.Command) {
		GitOpts.BindCommonFlags(c)
		GitOpts.BindChdirFlags(c)

		c.On(gcli.EvtCmdSubNotFound, SubCmdNotFound)
		c.On(gcli.EvtCmdRunBefore, func(ctx *gcli.HookCtx) bool {
			c.Infoln("[kite.GIT] Workdir:", c.WorkDir())
			return false
		})
	},
}

GitCommands commands for use git

View Source
var GitOpts = struct {
	AutoGitDir
	cmdbiz.CommonOpts
}{}

GitOpts object

Functions

func NewAddCommitCmd

func NewAddCommitCmd() *gcli.Command

NewAddCommitCmd instance

func NewAddCommitPush

func NewAddCommitPush() *gcli.Command

NewAddCommitPush command

func NewBatchCmd added in v0.3.0

func NewBatchCmd() *gcli.Command

NewBatchCmd command

func NewBatchPullCmd added in v0.3.0

func NewBatchPullCmd() *gcli.Command

func NewBatchRunCmd added in v0.3.0

func NewBatchRunCmd() *gcli.Command

func NewBranchCmd

func NewBranchCmd() *gcli.Command

NewBranchCmd instance

func NewBranchCreateCmd added in v0.3.0

func NewBranchCreateCmd() *gcli.Command

NewBranchCreateCmd instance

func NewBranchDeleteCmd added in v0.3.0

func NewBranchDeleteCmd() *gcli.Command

NewBranchDeleteCmd quickly delete branches

func NewBranchListCmd added in v0.3.0

func NewBranchListCmd() *gcli.Command

NewBranchListCmd instance

func NewBranchSetupCmd added in v0.3.0

func NewBranchSetupCmd() *gcli.Command

NewBranchSetupCmd instance

func NewChangelogCmd added in v0.3.0

func NewChangelogCmd() *gcli.Command

NewChangelogCmd instance

func NewCheckoutCmd

func NewCheckoutCmd() *gcli.Command

NewCheckoutCmd instance

func NewCloneCmd

func NewCloneCmd(cfgGetter gitx.ConfigProviderFn) *gcli.Command

NewCloneCmd instance

func NewGitEmojisCmd

func NewGitEmojisCmd() *gcli.Command

NewGitEmojisCmd instance

func NewInitFlowCmd

func NewInitFlowCmd() *gcli.Command

NewInitFlowCmd instance

func NewOpenRemoteCmd

func NewOpenRemoteCmd(cfgGetter gitx.ConfigProviderFn) *gcli.Command

NewOpenRemoteCmd instance

func NewPullRequestCmd

func NewPullRequestCmd() *gcli.Command

NewPullRequestCmd command

func NewRemoteInfoCmd added in v0.3.0

func NewRemoteInfoCmd() *gcli.Command

NewRemoteInfoCmd instance

func NewRepoInfoCmd added in v0.3.0

func NewRepoInfoCmd() *gcli.Command

NewRepoInfoCmd instance

func NewShowLogCmd added in v0.3.0

func NewShowLogCmd() *gcli.Command

func NewTagCmd added in v0.3.0

func NewTagCmd() *gcli.Command

NewTagCmd instance

func NewTagCreateCmd added in v0.3.0

func NewTagCreateCmd() *gcli.Command

NewTagCreateCmd instance

func NewTagDeleteCmd added in v0.3.0

func NewTagDeleteCmd() *gcli.Command

NewTagDeleteCmd instance

func NewTagListCmd added in v0.3.0

func NewTagListCmd() *gcli.Command

NewTagListCmd instance

func NewUpdateCmd

func NewUpdateCmd() *gcli.Command

NewUpdateCmd instance

func NewUpdatePushCmd

func NewUpdatePushCmd() *gcli.Command

NewUpdatePushCmd instance

func RedirectToGitx

func RedirectToGitx(ctx *gcli.HookCtx) (stop bool)

RedirectToGitx handle

func SubCmdNotFound

func SubCmdNotFound(ctx *gcli.HookCtx) (stop bool)

SubCmdNotFound handle

Types

type AutoGitDir

type AutoGitDir struct {
	// AutoGit auto find .git dir in parent.
	AutoGit bool
	GitHost string
}

AutoGitDir auto change to .git dir

func (*AutoGitDir) BindChdirFlags

func (a *AutoGitDir) BindChdirFlags(c *gcli.Command)

BindChdirFlags for auto change dir

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL