Perform common Git repository operations: status, add, commit, branch, checkout, merge, push, pull, fetch, log, diff, stash, tag and safe resets.
Use this skill to perform repository operations in a safe, auditable way. The skill must only call operations listed in allowedOperations; if a requested operation is not permitted the agent should inform the user and request configuration changes.
reset --hard, push --force, branch -D, revert), unless requireConfirmationForDestructiveOps is false and the user explicitly allowed the operation.allowedOperations.repositoryPath before running commands, and refuse to act if the path is not a git repository.status — show git status --porcelain and a human summary of staged/unstaged/untracked files.add — stage files. Params: paths (array) or paths: ["."] to add all.commit — create a commit. Params: message, author (optional), sign (optional).push — push to remote. Params: remote (default defaultRemote), branch, force (boolean).pull — pull from remote. Params: remote, branch, rebase (boolean).fetch — fetch updates.branch — create/list/delete branches. Params for create: name, startPoint.checkout — switch branches or restore files. Params: branch, paths.merge — merge a branch into current. Params: source, noFastForward.rebase — rebase current branch onto another. Use carefully.log — show commits. Params: maxCount, format.diff — show diffs. Params: paths, commitRange.stash — push/pop/list stashes.tag — create/list/delete tags.reset — soft/mixed/hard reset. Destructive when --hard.revert — create a revert commit for a specified commit.goal to determine the operation and parameters.allowedOperations.repositoryPath (use defaultRepositoryPath if unset) and ensure it contains a git repository.requireConfirmationForDestructiveOps is true, present a short explanation and ask for confirmation before proceeding.git tool or the shell tool exposed by the runtime). Capture stdout/stderr and exit code.result with relevant fields (e.g. commit id, branch name, pushed refs) and summary explaining the outcome.Goal: "Commit staged changes with message 'Fix validation bug'"
Operation: commit
Params: { "message": "Fix validation bug" }
Goal: "Create branch feature/auth and push to remote"
Operation: branch
Params: { "name": "feature/auth", "startPoint": "main" }
Then: push with params { "branch": "feature/auth" }
Operation: log
Params: { "maxCount": 5 }
git tool or shell tool to execute commands. Prefer a language-native git library when available for parseable results.allowedOperations to tool-level permission gates where possible.