gitcmd

package
v0.0.0-...-21f1268 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

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

func NewBatchCmd() *gcli.Command

NewBatchCmd command

func NewBatchPullCmd

func NewBatchPullCmd() *gcli.Command

func NewBatchRunCmd

func NewBatchRunCmd() *gcli.Command

func NewBranchCmd

func NewBranchCmd() *gcli.Command

NewBranchCmd instance

func NewBranchCreateCmd

func NewBranchCreateCmd() *gcli.Command

NewBranchCreateCmd instance

func NewBranchDeleteCmd

func NewBranchDeleteCmd() *gcli.Command

NewBranchDeleteCmd quickly delete branches

func NewBranchListCmd

func NewBranchListCmd() *gcli.Command

NewBranchListCmd instance

func NewBranchSetupCmd

func NewBranchSetupCmd() *gcli.Command

NewBranchSetupCmd instance

func NewChangelogCmd

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

func NewRemoteInfoCmd() *gcli.Command

NewRemoteInfoCmd instance

func NewRepoInfoCmd

func NewRepoInfoCmd() *gcli.Command

NewRepoInfoCmd instance

func NewShowLogCmd

func NewShowLogCmd() *gcli.Command

func NewTagCmd

func NewTagCmd() *gcli.Command

NewTagCmd instance

func NewTagCreateCmd

func NewTagCreateCmd() *gcli.Command

NewTagCreateCmd instance

func NewTagDeleteCmd

func NewTagDeleteCmd() *gcli.Command

NewTagDeleteCmd instance

func NewTagListCmd

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