Loading...
Loading...
Defines safe Git workflow conventions for agents. Use whenever creating or naming branches, inspecting or staging changes, writing commit messages, creating commits, pushing branches, force-pushing, or otherwise working with Git state.
npx skill4agent add forge-it/agent-skills git-workflowCo-Authored-By:Made-By:git add .git add -Agit push --forcegit push --force-with-lease<TICKET-NUMBER>-<what-problem-is-fixed><prefix>/<what-problem-is-fixed># With ticket numbers
git checkout -b PROJ-123-fix-login-timeout
git checkout -b FEAT-456-add-user-export
git checkout -b BUG-789-handle-null-response
# Without ticket numbers (use prefix)
git checkout -b fix/login-timeout
git checkout -b feat/add-user-export
git checkout -b chore/update-dependencies
# Bad examples
git checkout -b fix-stuff
git checkout -b new-feature
git checkout -b johns-branchgit status --short
git diff
git diff --cachedgit diff --cachedgit diff --cached"<TICKET-NUMBER>: What are the main changes and why"fix:feat:chore:wip:# With ticket numbers
git commit -m "PROJ-123: Fix session timeout by extending token TTL to 24 hours"
git commit -m "FEAT-456: Add CSV export for user data with pagination support"
git commit -m "BUG-789: Handle null API response in order processing"
# Without ticket numbers (use conventional prefixes)
git commit -m "fix: resolve session timeout by extending token TTL to 24 hours"
git commit -m "feat: add CSV export for user data with pagination support"
git commit -m "chore: update dependencies to latest versions"
git commit -m "wip: initial implementation of payment processing"
# Bad examples
git commit -m "fix bug"
git commit -m "updates"
git commit -m "WIP"# Small change - short message
git commit -m "PROJ-123: Fix typo in error message"
# Large change - detailed message
git commit -m "FEAT-456: Implement user authentication system
- Add JWT token generation and validation
- Create login and logout endpoints
- Add password hashing with bcrypt
- Include refresh token rotation
- Add rate limiting for auth endpoints"1. git status --short # Inspect working tree state
2. git diff # Review unstaged changes
3. git diff --cached # Review staged changes
4. Stage intended changes # Only after a commit prompt
5. Re-check git diff --cached # Confirm exactly what will be committed
6. Write the message # Match scope to staged changes
7. git commit # Commit only when promptedgit status -sb
git remote -v
git branch --show-current
git branch -vv