Documentation
¶
Index ¶
- func Checkout(ref string, worktree *git.Worktree) error
- func CheckoutCommit(hash string, worktree *git.Worktree) error
- func CheckoutTag(tag string, worktree *git.Worktree) error
- func CloneGit(dst string, rconf RemoteConfig) (*git.Repository, error)
- func Commit(r *git.Repository, message, user, email string) error
- func CommitAmend(r *git.Repository, message, user, email string) error
- func GetCurrentBranch(repo *git.Repository) (string, error)
- func InitGit(dst string) (*git.Repository, error)
- func IsBranch(repo *git.Repository) bool
- func IsClean(repo *git.Repository) (bool, error)
- func IsDetached(repo *git.Repository) bool
- func IsDirty(worktree *git.Worktree) bool
- func IsTag(repo *git.Repository) bool
- func OpenGit(dst string) (*git.Repository, error)
- func Pull(conf RemoteConfig, repo *git.Repository) error
- func Push(conf RemoteConfig, repo *git.Repository) error
- func TreeHash(dir string, repo *git.Repository) (string, error)
- func UncommitFiles(worktree *git.Worktree) ([]string, error)
- func UntrackedFiles(worktree *git.Worktree) ([]string, error)
- type GitCommitLog
- type GitReference
- type GitStatus
- type OpenConfig
- type RemoteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutCommit ¶
CheckoutCommit checks out a specific commit hash
func CheckoutTag ¶
CheckoutTag checks out a specific tag
func CloneGit ¶
func CloneGit(dst string, rconf RemoteConfig) (*git.Repository, error)
func CommitAmend ¶ added in v0.6.23
func GetCurrentBranch ¶
func IsDetached ¶
func IsDetached(repo *git.Repository) bool
func Pull ¶
func Pull(conf RemoteConfig, repo *git.Repository) error
Pull fetches from remote and merges into current branch
func Push ¶
func Push(conf RemoteConfig, repo *git.Repository) error
func UncommitFiles ¶
UncommitFiles returns a list of files that have been modified but not committed
func UntrackedFiles ¶
UntrackedFiles returns a list of files that are not tracked by Git
Types ¶
type GitCommitLog ¶
func Log ¶
func Log(offset, limit int, repo *git.Repository) ([]GitCommitLog, error)
Log returns commit history with pagination support
func RemoteLog ¶
func RemoteLog(offset, limit int, conf RemoteConfig, repo *git.Repository) ([]GitCommitLog, error)
RemoteLog retrieves commit logs from remote repository with pagination support
type GitReference ¶
func GetCurrentReference ¶
func GetCurrentReference(repo *git.Repository) (GitReference, error)
type OpenConfig ¶
Click to show internal directories.
Click to hide internal directories.