Merge pull request #5 from AstroSteveo/copilot/vscode1758469875607

Add Git --porcelain flag explanation prompt for scripting education
This commit is contained in:
Steven Mosley 2025-09-21 14:03:32 -05:00 committed by GitHub
commit c7d3a3b77e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 105 additions and 5 deletions

3
.gitignore vendored
View File

@ -13,3 +13,6 @@ test-apply-config.yml
# Test output directories
test-output/
# Awesome Copilot generated files
.awesome-copilot/

15
.vscode/settings.json vendored
View File

@ -16,11 +16,22 @@
"editor.formatOnSave": true
},
"editor.rulers": [
100
120
],
"files.associations": {
"*.chatmode.md": "markdown",
"*.instructions.md": "markdown",
"*.prompt.md": "markdown"
}
},
"github.copilot.chat.agent.thinkingTool": true,
"github.copilot.chat.alternateGptPrompt.enabled": true,
"github.copilot.chat.editor.temporalContext.enabled": true,
"github.copilot.chat.edits.temporalContext.enabled": true,
"github.copilot.chat.generateTests.codeLens": true,
"github.copilot.chat.languageContext.fix.typescript.enabled": true,
"github.copilot.chat.languageContext.inline.typescript.enabled": true,
"github.copilot.chat.languageContext.typescript.enabled": true,
"github.copilot.chat.newWorkspace.useContext7": true,
"github.copilot.chat.notebook.enhancedNextEditSuggestions.enabled": true,
"github.copilot.chat.notebook.followCellExecution.enabled": true,
}

View File

@ -65,6 +65,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
| [Product Manager Assistant: Feature Identification and Specification](prompts/gen-specs-as-issues.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgen-specs-as-issues.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgen-specs-as-issues.prompt.md) | This workflow guides you through a systematic approach to identify missing features, prioritize them, and create detailed specifications for implementation. |
| [Migration and Code Evolution Instructions Generator](prompts/generate-custom-instructions-from-codebase.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgenerate-custom-instructions-from-codebase.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgenerate-custom-instructions-from-codebase.prompt.md) | Migration and code evolution instructions generator for GitHub Copilot. Analyzes differences between two project versions (branches, commits, or releases) to create precise instructions allowing Copilot to maintain consistency during technology migrations, major refactoring, or framework version upgrades. |
| [Git Flow Branch Creator](prompts/git-flow-branch-creator.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgit-flow-branch-creator.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgit-flow-branch-creator.prompt.md) | Intelligent Git Flow branch creator that analyzes git status/diff and creates appropriate branches following the nvie Git Flow branching model. |
| [Git --porcelain Flag Explainer](prompts/git-porcelain-explain.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgit-porcelain-explain.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgit-porcelain-explain.prompt.md) | Comprehensive explanation of Git --porcelain flag: what it does, why it exists, and how to use it for scripting and automation |
| [Java Documentation (Javadoc) Best Practices](prompts/java-docs.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-docs.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-docs.prompt.md) | Ensure that Java types are documented with Javadoc comments and follow best practices for documentation. |
| [JUnit 5+ Best Practices](prompts/java-junit.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-junit.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-junit.prompt.md) | Get best practices for JUnit 5 unit testing, including data-driven tests |
| [Spring Boot Best Practices](prompts/java-springboot.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md) | Get best practices for developing applications with Spring Boot. |

9
package-lock.json generated
View File

@ -8,14 +8,17 @@
"name": "awesome-copilot",
"version": "1.0.0",
"license": "MIT",
"bin": {
"awesome-copilot": "awesome-copilot.js"
},
"devDependencies": {
"all-contributors-cli": "^6.26.1"
}
},
"node_modules/@babel/runtime": {
"version": "7.28.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.3.tgz",
"integrity": "sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==",
"version": "7.28.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
"integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"dev": true,
"license": "MIT",
"engines": {

View File

@ -0,0 +1,82 @@
---
description: 'Comprehensive explanation of Git --porcelain flag: what it does, why it exists, and how to use it for scripting and automation'
mode: 'ask'
tools: ['run_in_terminal']
---
# Git --porcelain Flag Explainer
You are a Git expert who specializes in explaining Git's more advanced features to developers who want to understand the tools they use every day.
## Task
Provide a comprehensive explanation of Git's `--porcelain` flag, covering:
1. **What `--porcelain` means and does**
2. **The difference between regular and porcelain output**
3. **Why it's called "porcelain"**
4. **Which Git commands support it**
5. **Practical examples and use cases**
6. **How it helps with scripting and automation**
## Context
Many developers see `--porcelain` in scripts and Git documentation but don't understand:
- What the flag actually does
- Why the output format matters
- When and how to use it effectively
- The difference between "porcelain" and "plumbing" in Git terminology
## Output Requirements
Structure your explanation with:
### 1. Quick Definition
Start with a clear, concise explanation of what `--porcelain` does.
### 2. The Name Origin
Explain Git's "porcelain" vs "plumbing" terminology and why this flag is called porcelain.
### 3. Output Format Comparison
Show side-by-side examples of the same Git command with and without `--porcelain`, highlighting the differences.
### 4. Common Commands That Support --porcelain
List and demonstrate the most frequently used Git commands that accept this flag:
- `git status --porcelain`
- `git branch --porcelain` (if applicable)
- Others as relevant
### 5. Practical Use Cases
Provide real-world scenarios where `--porcelain` is beneficial:
- Shell scripting
- CI/CD pipelines
- Git hooks
- Automated workflows
- Parsing Git output programmatically
### 6. Scripting Examples
Include practical code examples showing how to:
- Parse porcelain output in shell scripts
- Use it in conditional statements
- Extract specific information for automation
### 7. Best Practices
Advise when to use `--porcelain` vs regular output, and any gotchas to watch out for.
## Guidelines
- Use actual Git commands and real output examples
- Explain technical concepts in accessible language
- Include both the "what" and the "why"
- Focus on practical, actionable information
- Provide ready-to-use code snippets
- Address common misconceptions
- Be concise but thorough
## Expected Outcome
After reading your explanation, developers should:
- Understand exactly what `--porcelain` does
- Know when and why to use it
- Be able to implement it in their own scripts
- Appreciate the design philosophy behind Git's interface layers