resolve-conflicts
यह क्या करती है
यह स्किल Git मर्ज कॉन्फ़्लिक्ट को सोच-समझकर योजना के साथ सुलझाने में मदद करती है। इसमें इंपोर्ट, टेस्ट, लॉक फ़ाइलें और वे फ़ाइलें शामिल हैं जो एक तरफ़ से हटा दी गई थीं। यह उन डेवलपर्स के लिए है जिनके सामने मर्ज कॉन्फ़्लिक्ट आते हैं।
कब इस्तेमाल करें
- ✓जब Git मर्ज या rebase कॉन्फ़्लिक्ट के साथ रुक जाए और उन्हें सुलझाना हो।
- ✓जब लॉक फ़ाइल या जनरेट की गई फ़ाइल में कॉन्फ़्लिक्ट हो और उसे दोबारा बनाना हो।
- ✓जब एक ब्रांच ने कोई फ़ाइल हटा दी हो जिसे दूसरी ब्रांच ने बदला हो।
Skill का लिंक
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/resolve-conflicts/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप ये मर्ज कॉन्फ़्लिक्ट सुलझाने में मदद कर सकते हैं, और हर एक के लिए बताइए कि आपने क्या किया?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कॉन्फ़्लिक्ट की स्थिति जाँचता है, हर फ़ाइल के लिए योजना बनाता है और आपकी मंज़ूरी मांगता है। फिर वह योजना लागू करता है, टेस्ट चलाता है और हर फ़ैसला समझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Git Conflict Resolution
Resolve Git merge conflicts by intelligently combining changes from both branches while preserving the intent of both changes. This skill follows a plan-first approach: assess conflicts, create a detailed resolution plan, get approval, then execute.
Core Principles
- Plan Before Executing: Always create a structured resolution plan and get user approval before making changes
- Prefer Both Changes: Default to keeping both changes unless they directly contradict
- Merge, Don't Choose: Especially for imports, tests, and configuration
- Regenerate Generated Files: Never manually merge generated files - always regenerate them from their sources
- Backup Before Resolving: For deleted-modified files, create backups first
- Validate with Tests: Always run tests after resolution
- Explain All Resolutions: For each conflict resolved, provide a one-line explanation of the resolution strategy
- Ask When Unclear: When the correct resolution isn't clear from the diff, present options to the user and ask for their choice
Workflow
Step 1: Assess the Conflict Situation
Run initial checks to understand the conflict scope:
git status
Identify and categorize all conflicted files:
- Regular file conflicts (both modified)
- Deleted-modified conflicts (one deleted, one modified)
- Generated file conflicts (lock files, build artifacts, generated code)
- Test file conflicts
- Import/configuration conflicts
- Binary file conflicts
For each conflicted file, gather information:
- File type and purpose
- Nature of the conflict (content, deletion, type change)
- Scope of changes (lines changed, sections affected)
- Whether the file is generated or hand-written
Step 2: Create Merge Resolution Plan
Based on the assessment, create a structured plan before resolving any conflicts. Present the plan in the following markdown format:
## Merge Resolution Plan
### Conflict Summary
- **Total conflicted files**: [N]
- **Deleted-modified conflicts**: [N]
- **Generated files**: [N]
- **Regular conflicts**: [N]
### Resolution Strategy by File
#### 1. [File Path]
**Conflict Type**: [deleted-modified / generated / imports / tests / code logic / config / struct / binary]
**Strategy**: [Brief description of resolution approach]
**Rationale**: [Why this strategy is appropriate]
**Risk**: [Low/Medium/High] - [Brief risk description]
**Action Items**:
- [ ] [Specific action 1]
- [ ] [Specific action 2]
#### 2. [File Path]
...
### Execution Order
1. **Phase 1: Deleted-Modified Files** - Handle deletions and backups first
2. **Phase 2: Generated Files** - Regenerate from source
3. **Phase 3: Low-Risk Merges** - Imports, tests, documentation
4. **Phase 4: High-Risk Merges** - Code logic, configuration, structs
5. **Phase 5: Validation** - Compile, test, verify
### Questions/Decisions Needed
- [ ] **[File/Decision]**: [Question for user] (Options: 1, 2, 3)
### Validation Steps
- [ ] Run conflict validation script
- [ ] Compile project
- [ ] Run test suite
- [ ] Manual verification of high-risk changes
Present this plan to the user and wait for their approval before proceeding with resolution. If there are any unclear conflicts where you need user input, list them in the "Questions/Decisions Needed" section.
For a complete example plan, see references/sample-plan.md.
Step 3: Handle Deleted-Modified Files
Execute this phase only after the plan is approved.
If there are deleted-but-modified files (status: DU, UD, DD, UA, AU):
.forge/skills/resolve-conflicts/scripts/handle-deleted-modified.sh
This script will:
- Create timestamped backups of modified content
- Analyze potential relocation targets
- Generate analysis reports for each file
- Automatically resolve the deletion status
Review the backup directory and analysis files to understand where changes should be applied.
Step 4: Execute Resolution Plan
Follow the execution order defined in your plan. For each conflicted file, apply the appropriate resolution pattern according to your plan. For every conflict you resolve, provide a one-line explanation of how you're resolving it.
As you complete each action item in your plan, mark it as done and report progress to the user.
When Resolution is Unclear
When you cannot determine the correct resolution from the diff alone (these should already be listed in your plan's "Questions/Decis
अक्सर पूछे जाने वाले सवाल
क्या यह बिना पूछे कॉन्फ़्लिक्ट सुलझा देगा?
नहीं। यह पहले योजना बनाता है और बदलाव करने से पहले आपकी मंज़ूरी लेता है।
लॉक फ़ाइलें कैसे संभालता है?
वह उन्हें हाथ से मर्ज करने के बजाय उनके स्रोत से दोबारा बनाता है।
क्या बाद में टेस्ट चलते हैं?
हां। सुलझाने के बाद परिणाम जाँचने के लिए टेस्ट चलाए जाते हैं।
जानकारी
लेखक का मूल विवरण
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
repo: tailcallhq/forgecode
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13114
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
create-agent
7.6kयह आपके एजेंट को Forge कोडिंग ऐप के लिए कस्टम एजेंट बनाने या बदलने में मदद करती है, जो markdown फ़ाइलों में ऊपर सेटिंग के साथ रखे जाते हैं।
create-command
7.6kयह आपके एजेंट को Forge के लिए दोबारा चलने वाले कमांड बनाना सिखाती है, जो क्रम से चलने वाले markdown चरणों के रूप में लिखे जाते हैं।
create-github-issue
7.6kयह आपके एजेंट को GitHub इश्यू बनाने में मदद करती है, जो रिपॉज़िटरी के अपने issue टेम्पलेट का पालन करे, सही फ़ील्ड और लेबल के साथ।
create-plan
7.6kयह आपके एजेंट को किसी जटिल काम के लिए चरणों, जोखिमों और विकल्पों वाली विस्तृत योजना लिखने में मदद करती है, कोड बदलने से पहले।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।