Git Pull Request Instructions
When the user asks to create a pull request, follow these steps:
- Verify the current branch is not the target branch (e.g., not on main/master).
- Ensure all commits are pushed to the remote repository.
- Determine the platform (GitHub, GitLab, Bitbucket) from the remote URL.
- For GitHub:
- Use GitHub CLI (
gh pr create) if available - Or provide the web URL to create PR manually
- Use GitHub CLI (
- For GitLab:
- Use GitLab CLI (
glab mr create) if available - Or provide the web URL
- Use GitLab CLI (
- Gather PR details:
- Title (use latest commit message as default)
- Description/body
- Target branch (usually main/master)
- Reviewers (if specified)
- Labels (if specified)
- Create the PR and provide the URL to view it.
- If CLI tools are not available, provide web URLs and instructions.
Additional references:
- Overview: see OVERVIEW.md
- Usage details: see USAGE.md
- Examples: see EXAMPLES.md