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
- Pull from a remote branch
- pull_
ff_ only - Pull from a remote branch (fast-forward only, safe)
- rebase
- Rebase current branch onto a target
- reset_
soft - Soft reset to target (keeps changes in working directory as staged)
- 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)