Feature branch

From forcedotcom/apex-language-support · View interactive version

Feature branch is an AI agent skill from the GitHub repository forcedotcom/apex-language-support. Create feature branches for all work. Use when creating branches, checking out, or pushing. Prevents accidental push to main.

How to use this skill

Skill file

Feature Branch

All work must be on feature branches. Never commit directly to main.

Do

Branch format: <type>/W-XXXXX-short-description (e.g. feature/W-23006798-implementor-references, fix/..., chore/...). Include a short description after the work item number.

git fetch origin main
git checkout main
git pull
git checkout -b feature/W-XXXXX-short-description
# ... work, commit ...
git push -u origin feature/W-XXXXX-short-description

Or, branch from remote without tracking it:

git fetch origin main
git checkout -b feature/W-XXXXX-short-description origin/main --no-track

Don't

Never git checkout -b feature/W-XXXXX origin/main without --no-track.

That sets the new branch to track origin/main. A bare git push would then push to main instead of creating a remote feature branch.

Summary

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.