Commit 99bd636
committed
docs(workflow): improve commit message workflow to prevent corruption
Problem: Using `git commit -m` with multi-line messages causes terminal
corruption. The terminal can corrupt messages during echo/display, leading
to corrupted commit objects with garbled text in the git history.
Root Cause: Terminal character handling issues when processing long multi-line
strings passed via `-m` flag. The corruption occurs during command execution
and gets permanently stored in the git commit object.
Solution: Updated copilot instructions to mandate file-based commit workflow.
Write message to scratch/commit-msg.txt, validate it, then use `git commit -F`
to read from file. This bypasses terminal string handling entirely.
Changes:
- .github/copilot-instructions.md: Replaced `-m` approach with file-based workflow
- Added detailed commit workflow section with validation step
- Updated "During Work" section to reference new approach
- Emphasized WHY this prevents corruption
Testing:
✅ Documentation: Clear step-by-step workflow
✅ Validation: Built-in message review step
✅ This commit: Used the new workflow successfully
Impact: Prevents corrupted commit messages in git history. Ensures all commit
messages are clean, readable, and maintainable. Makes git log reliable for
tracking project history.1 parent 96c1928 commit 99bd636
1 file changed
Lines changed: 51 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
254 | 261 | | |
255 | | - | |
256 | | - | |
| 262 | + | |
| 263 | + | |
257 | 264 | | |
258 | | - | |
259 | | - | |
| 265 | + | |
| 266 | + | |
260 | 267 | | |
261 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
262 | 276 | | |
263 | | - | |
264 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
265 | 295 | | |
266 | 296 | | |
267 | 297 | | |
268 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
269 | 305 | | |
270 | 306 | | |
271 | 307 | | |
| |||
352 | 388 | | |
353 | 389 | | |
354 | 390 | | |
355 | | - | |
356 | | - | |
357 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
358 | 397 | | |
359 | 398 | | |
360 | 399 | | |
| |||
0 commit comments