utsavsavani08/rain-skill-main/git-workflow

Claude Code and agent skill by utsavsavani08/rain-skill-main

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Git workflow patterns for feature branches, conventional commits, PR hygiene, merge strategies, and release tagging. Load whenever the user asks about branching, committing, merging, rebasing, tagging, or CI/CD integration with git. Enforces conventional commits, branch naming, and safe merge practices.

Install

npx vskill@latest install utsavsavani08/rain-skill-main/git-workflow

SKILL.md

The same SKILL.md was published earlier as utsavsavani08/rain-skill-main/git-workflow.

Git Workflow — Branching, Commits, and Release Discipline

Consistent git hygiene that makes history readable, merges safe, and releases predictable. Enforces conventional commits, clean branch naming, and safe merge strategies.

Branch naming convention

<type>/<ticket-or-slug>
Examples:
feat/user-auth
fix/login-redirect-loop
refactor/auth-middleware
docs/api-readme
chore/upgrade-dependencies
hotfix/prod-null-crash
PrefixWhen to use
feat/New feature
fix/Bug fix
refactor/Code restructure, no behavior change
docs/Documentation only
chore/Tooling, deps, config
hotfix/Emergency production fix
release/Release preparation branch

Conventional commits

Format: <type>(<scope>): <short description>

feat(auth): add JWT refresh token rotation
fix(api): handle null user on /me endpoint
refactor(db): extract query builder to separate module
docs(readme): update setup instructions
chore(deps): upgrade next.js to 14.2
test(auth): add login edge case coverage
perf(list): switch to virtual scroll for >1000 items
TypeWhen
featNew feature
fixBug fix
refactorNo behavior change
docsDocs only
testTests only
choreBuild/tooling/deps
perfPerformance improvement
ciCI/CD pipeline
revertReverts a prior commit

Breaking changes: append ! after type: feat(api)!: remove deprecated /v1 endpoints


Daily workflow

bash
# Start new feature
git checkout main && git pull
git checkout -b feat/my-feature
# Work in small commits
git add <specific files> # NEVER git add -A blindly
git commit -m "feat(scope): description"
# Keep branch up to date (prefer rebase over merge for feature branches)
git fetch origin
git rebase origin/main
# Push
git push -u origin feat/my-feature

Merge strategy

ScenarioStrategyWhy
Feature branch → mainSquash merge (default)Clean linear history
Long-lived release branchMerge commitPreserve all history
Hotfix → main AND releaseCherry-pickMinimal blast radius
Rebase before PRInteractive rebaseClean up WIP commits
Squash merge (GitHub/GitLab)
bash
# Local equivalent
git checkout main
git merge --squash feat/my-feature
git commit -m "feat(scope): my feature (#42)"
git branch -d feat/my-feature

Rebasing safely

bash
# Rebase feature branch onto latest main
git fetch origin
git rebase origin/main
# Interactive rebase — clean up last N commits before PR
git rebase -i HEAD~5
# If conflicts arise during rebase
git status # see conflicting files
# resolve conflicts in editor
git add <resolved files>
git rebase --continue
# Abort and go back to original state
git rebase --abort

Hard rule: Never rebase a branch that others are working on. Rebase only your own local/remote-only feature branch.


PR hygiene checklist

Before opening a PR:

  • [ ] Branch is rebased onto latest main (no stale conflicts)
  • [ ] Commits are clean (no "WIP", "fix fix fix", debug commits)
  • [ ] PR title follows conventional commit format
  • [ ] PR description has: What, Why, How to test
  • [ ] All CI checks pass
  • [ ] Linked to the relevant ticket/issue
  • [ ] Self-reviewed the diff (no accidental debug code, no .env files)
  • [ ] No secrets or credentials in the diff
PR description template
markdown
## What
Brief description of the change.
## Why
The motivation — bug, feature request, tech debt.
## How to test
1.Step one
2.Step two
3.Expected result
## Screenshots (if UI change)

Stashing

bash
# Stash current changes before switching context
git stash push -m "WIP: user profile form"
# List stashes
git stash list
# Apply most recent stash
git stash pop
# Apply specific stash
git stash apply stash@{2}
# Drop a stash
git stash drop stash@{0}

Tagging and releases

bash
# Semantic versioning: MAJOR.MINOR.PATCH
git tag -a v1.2.0 -m "Release v1.2.0 — user auth feature"
git push origin v1.2.0
# List tags
git tag -l "v*"
# Checkout a specific release
git checkout v1.2.0
When to bump which version
ChangeVersion bump
Breaking changeMAJOR (v1.x → v2.0)
New feature, backward-compatibleMINOR (v1.1 → v1.2)
Bug fix, patchPATCH (v1.1.0 → v1.1.1)

Undoing mistakes

SituationSafe fix
Undo last commit, keep changes stagedgit reset --soft HEAD~1
Undo last commit, keep changes unstagedgit reset HEAD~1
Discard unstaged changes to a filegit checkout -- <file>
Revert a commit already pushedgit revert <sha> (creates new commit)
Remove a file from last commitgit reset HEAD~1 -- <file> && git commit --amend

Never use `git reset --hard` on shared branches. Use git revert to create a safe undo commit.


gitignore essentials

Always ensure these are ignored:

gitignore
# Environment / secrets
.env
.env.local
.env.*.local
*.pem
*.key
# Dependencies
node_modules/
.venv/
__pycache__/
vendor/
# Build output
dist/
build/
.next/
out/
# Editor
.vscode/settings.json
.idea/
*.swp
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*

Hard rules

  1. Never commit secrets. If you do, rotate the credential immediately — git history is public.
  2. Never force-push to main/master. Use git revert instead.
  3. Never `git add -A` without reviewing `git status` first.
  4. Always rebase feature branches before merging — keeps history linear.
  5. Commit small and often — one logical change per commit, not one commit per day.
  6. Use `git diff --staged` before every commit — review exactly what you're committing.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/utsavsavani08/rain-skill-main/git-workflow/badge)](https://verified-skill.com/skills/utsavsavani08/rain-skill-main/git-workflow)

Something wrong with this skill or its page? Tell us.