Expand description
State-changing git operations
Functions§
- add_all
- Stage all changes (including untracked files)
- checkout
- Checkout an existing branch
- checkout_
new_ branch - Create and checkout a new branch from a starting point
- commit
- Create a commit with the given message
- delete_
branch - Delete a local branch (safe delete, requires merge)
- delete_
remote_ branch - Delete a remote branch
- discard_
all_ changes - Discard all uncommitted changes (both staged and unstaged, including untracked files)
- fetch_
prune - Fetch from origin with prune
- force_
delete_ branch - Force delete a local branch
- force_
push_ with_ lease - Force push with lease (safer than –force)
- git_
run_ in_ dir - Execute a git command in a specific directory.
Sets the process working directory (not just
git -C) so it works even if the caller’s cwd has been deleted. - log_
commits - Get commits that are in
tobut not infrom - pull_
ff_ only - Pull from a remote branch (fast-forward only, safe)
- rebase
- Rebase current branch onto a target
- rebase_
onto - Rebase the current branch onto
new_base, replaying only the commits afterold_base(git rebase --onto <new_base> <old_base>). - reset_
soft - Soft reset to target (keeps changes in working directory as staged)
- set_
branch_ base - Record the base branch a branch is stacked on (
branch.<name>.gwBase). - set_
branch_ base_ sha - Record the base tip SHA a branch was stacked on (
branch.<name>.gwBaseSha). - unset_
branch_ base - Clear a branch’s recorded base info (
branch.<name>.gwBaseand.gwBaseSha). - worktree_
add - Add a new worktree at the given path with a new branch from a start point
- worktree_
prune - Prune stale worktree entries
- worktree_
remove - Remove a worktree (with –force)