safe-git-workflow
Perform Git operations while preserving user work and avoiding accidental publication or history loss. Use for branch, staging, commit, rebase, merge, or push tasks.
Files1
View on GitHubSKILL.mdskills/safe-git-workflow/SKILL.md
GitHubSafe Git Workflow
- Inspect
git status, branch, upstream, remotes, staged and unstaged diffs, and untracked files before acting. - Read project instructions and identify the intended base/target branch.
- Stage explicit paths where practical; inspect the staged diff before committing.
- Preserve unrelated changes. Never use destructive cleanup commands as a shortcut.
- Before rebase, reset, force-push, branch deletion, or history rewrite, explain the effect and obtain explicit authorization if not already granted.
- Before push or opening a PR, confirm the target repository, branch, visibility, and intended content.
- After the operation, inspect status, commit contents, and remote state if a network action occurred.
Do not commit secrets, local configuration, generated clutter, or personal files. Never claim a push or merge succeeded without observing the host result. When a conflict occurs, resolve only the intended files and rerun relevant checks.