Skip to content

Commit 6d99e67

Browse files
authored
Merge pull request #97 from github/DanWahlin-patch-2
Add commit message generation instructions
2 parents 0536f98 + f163532 commit 6d99e67

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

03-development-workflows/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ copilot
724724
> Users report: 'Finding books by author name doesn't work for partial names'
725725
> @samples/book-app-project/books.py Analyze and identify the likely cause
726726
727-
# 2. Debug the issue (continuing in same session)
727+
# 2. Debug the issue and fix (continuing in same session)
728728
> Based on the analysis, show me the find_by_author function and explain the issue
729729
730730
> Fix the find_by_author function to handle partial name matches
@@ -736,21 +736,35 @@ copilot
736736
> - Case-insensitive matching
737737
> - Author name not found
738738
739-
# 4. Generate commit message
739+
# Exit the interactive session
740+
741+
> /exit
742+
743+
# 4. Run git add
744+
745+
# Stage the changes so git diff --staged has something to work with
746+
git add .
747+
748+
# 5. Generate commit message
740749
copilot -p "Generate commit message for: $(git diff --staged)"
741750
742-
# Output: "fix(books): support partial author name search"
751+
# Example Output: "fix(books): support partial author name search"
752+
753+
# 6. Commit changes (optional)
754+
755+
git commit -m "<paste generated message>"
743756
```
744757
745758
### Bug Fix Workflow Summary
746759
747760
| Step | Action | Copilot Command |
748761
|------|--------|-----------------|
749762
| 1 | Understand the bug | `> [describe bug] @relevant-file.py Analyze the likely cause` |
750-
| 2 | Get detailed analysis | `> Show me the function and explain the issue` |
751-
| 3 | Implement the fix | `> Fix the [specific issue]` |
752-
| 4 | Generate tests | `> Generate tests for [specific scenarios]` |
753-
| 5 | Commit | `copilot -p "Generate commit message for: $(git diff --staged)"` |
763+
| 2 | Analysis and fix | `> Show me the function and fix the issue` |
764+
| 3 | Generate tests | `> Generate tests for [specific scenarios]` |
765+
| 4 | Stage changes | `git add .` |
766+
| 5 | Generate commit message | `copilot -p "Generate commit message for: $(git diff --staged)"` |
767+
| 6 | Commit changes| `git commit -m "<paste generated message>"` |
754768
755769
---
756770

0 commit comments

Comments
 (0)