Execute the following workflow to create a Pull Request from current changes:
-
Check current branch status
- Run
git statusto see all changes - Run
git branch --show-currentto get current branch name
- Run
-
Branch handling
- Create a new feature branch first
- Analyze the current changes (staged and unstaged)
- Generate a descriptive branch name based on the changes (e.g.,
feat/add-new-feature,fix/resolve-bug-issue) - Branch naming convention:
feat/for new featuresfix/for bug fixesrefactor/for refactoringchore/for maintenance tasks
- Create and switch to the new branch:
git checkout -b <branch-name>
-
Stage and commit changes
- Stage all changes:
git add . - Create a descriptive commit message based on the changes
- Commit with the message following conventional commits format
- Do NOT add any Claude signatures, Co-Authored-By, or Generated with Claude Code messages
- Stage all changes:
-
Push to remote
- Push the branch to origin:
git push -u origin <branch-name>
- Push the branch to origin:
-
Create Pull Request
- Use
gh pr createto create a PR targeting thexbranch - Generate a clear PR title and description based on the changes
- Include a summary of what was changed
- Use
-
Update branch and enable auto-merge
- Update the PR branch with latest base branch:
gh pr update-branch <PR_NUMBER> - Enable auto-merge with squash:
gh pr merge <PR_NUMBER> --auto --squash
- Update the PR branch with latest base branch:
-
Return the PR URL
- Display the PR URL to the user
-
Open the PR in browser
- Automatically open the PR URL in the default browser:
open <PR_URL>
- Automatically open the PR URL in the default browser:
- The commit message should follow the format:
type: description