git

package
v0.0.0-...-0356953 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

type Operator struct {
	// contains filtered or unexported fields
}

Operator 封装 Git 操作的结构体

func NewGitOperator

func NewGitOperator(dir string) (*Operator, error)

NewGitOperator 创建 Git 操作实例 dir: 仓库目录(如 "." 表示当前目录)

func (*Operator) Commit

func (g *Operator) Commit(message string) (string, error)

Commit 提交修改(类似 git commit -m) message: 提交信息

func (*Operator) Open

func (g *Operator) Open() error

Open 打开已存在的 Git 仓库(类似 cd 到仓库目录)

Jump to

Keyboard shortcuts

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