← ClaudeAtlas

git-opslisted

Use when Sam asks Codex to create, rename, compare, commit, push, merge, promote, or clean up Git branches. Covers Sam's feature branch naming convention, safe Git pre-checks, JetBrains DontCommit handling, commit-message defaults, push and release promotion verification, branch rename upstream cleanup, branch sync comparison, and submodule/gitlink handling.
codingSamss/all-my-ai-needs · ★ 9 · Code & Development · score 66
Install: claude install-skill codingSamss/all-my-ai-needs
# Git Ops ## Scope Use this skill for Git operation tasks. Keep project-specific runtime, build, API, environment, and release-policy details in the repo's `AGENTS.md`; keep reusable Git behavior here. Do not expand scope silently. If Sam only asks to inspect, report findings. If Sam asks to commit/push/merge, carry that operation through verification unless blocked. ## Safety Rules Before any Git write operation: ```bash git status --short --branch ``` Rules: - Treat existing uncommitted changes as user work unless proven otherwise. - Do not run destructive commands such as `git reset --hard`, `git checkout -- <file>`, `git clean -fd`, `git push --delete`, or force-push without explicit written confirmation. - Use `git clean -fdn` before any real clean operation and report what would be removed. - Prefer `rg`, `git diff`, `git status`, `git branch -vv`, `git log`, and `git show-ref` for inspection before acting. - For remote cleanup wording, say `stale local remote-tracking refs` or `本地 origin/* 缓存`; `git fetch --prune origin` does not delete remote branches. ## Feature Branch Naming When Sam says "功能分支" or asks to create a feature branch, use: ```text feature/<YYYYMMDD>/<需求编码>_<功能简介> ``` Example: ```text feature/20260521/MR2026052182911_xiaomei ``` Rules: - The first path segment is always `feature`. - The second segment is the date as `YYYYMMDD`. - Sam usually provides the date. If the date is missing, ask before creating the branch. - If Sam provides `MMDD`