hacks

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package hacks provides Git shortcut commands for common operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmendNoEdit

func AmendNoEdit() error

AmendNoEdit amends the last commit without editing the message. Equivalent to: git commit --amend --no-edit

func BlameLine

func BlameLine(file string, startLine, endLine int) (string, error)

BlameLine shows blame for a specific line range.

func BranchClean

func BranchClean(dryRun bool) ([]string, error)

BranchClean deletes local branches that have been merged into the current branch. Returns the list of deleted branches.

func DiffWords

func DiffWords(args ...string) (string, error)

DiffWords shows word-level diff.

func FetchAll

func FetchAll() error

FetchAll fetches all remotes with prune.

func LogGraph

func LogGraph(count int) (string, error)

LogGraph shows a pretty log with graph.

func PullRebase

func PullRebase() error

PullRebase pulls from the remote with rebase.

func Push

func Push(force bool) error

Push pushes to the remote with current branch.

func QuickCommit

func QuickCommit(message string, addAll bool) error

QuickCommit stages all changes and commits with a message. Equivalent to: git add -A && git commit -m "message"

func StashStaged

func StashStaged(message string) error

StashStaged stashes only staged changes.

func Status

func Status() (string, error)

Status returns the current git status.

func Undo

func Undo() error

Undo undoes the last commit, keeping changes staged. Equivalent to: git reset --soft HEAD~1

Types

This section is empty.

Jump to

Keyboard shortcuts

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