Automated summary
This skill provides a comprehensive protocol to avoid and resolve Git merge issues, especially with GitHub Pages, including preparation, safe merging, post-merge validation, and troubleshooting stuck states.
Strengths
- Provides a step-by-step protocol for safe merges.
- Includes specific solutions for GitHub Pages cache issues.
- Offers troubleshooting procedures for stuck Git states (rebase, locks).
- Provides checklists before and after merge to prevent mistakes.
Limitations
- Requires familiarity with basic Git commands.
- Does not cover all complex conflict cases (e.g., large binary files).
- GitHub Pages cache workarounds may be temporary.
Use this skill when you need to merge branches reliably, especially when deploying to GitHub Pages or facing cache or conflict problems.
Avoid using it for trivial merges with no conflicts, or if you prefer a graphical merge tool (GUI) over manual commands.
Security analysis
CautionThe skill includes potentially destructive commands (hard reset, forced kill, file removal) that could cause data loss or system disruption if misused, but they are used in a legitimate troubleshooting context with warnings. No external network calls or data exfiltration.
- •Uses git reset --hard, which discards uncommitted changes permanently.
- •Contains rm -f .git/index.lock, removing a lock file that could be in use if multiple git processes run.
- •Includes taskkill /f im git* and taskkill /f im GitHubDesktop.exe, force-killing git processes, potentially disrupting active operations.
Examples
I have a merge conflict between my feature branch and main. Can you help me resolve it step by step following the safe merge protocol?My GitHub Pages site is not updating after push. How can I force a rebuild using the cache busting technique?My git rebase is stuck in interactive mode. How do I abort it and clean up?🚀 Skill: Git Merge Mastery - Evitar Problemas de Merge
Objetivo
Prevenir e resolver problemas comuns de git merge, especialmente com GitHub Pages.
Problemas Comuns Identificados
- Merge incompleto - Commits da feature branch não chegam no main
- Cache do GitHub Pages - HTML antigo persiste mesmo após updates
- Conflitos de arquivos binários - HTML/CSS com conflitos complexos
- Rebase travado - Git em estado inconsistent
📋 Protocolo de Merge Seguro
1. PRÉ-MERGE (Preparação)
# Verificar diferenças entre branches
git diff main..feature/nova-feature --name-only
# Verificar histórico
git log --oneline --graph --all --decorate -10
# Ensure clean working directory
git status
git checkout .
2. MERGE CORRETO (Passo a passo)
# 1. Atualizar main
git checkout main
git pull origin main
# 2. Fazer merge explícito
git merge feature/nova-feature --no-ff -m "feat: merge completo de feature/nova-feature"
# 3. Verificar conflitos
git status
# 4. Resolver conflitos se necessário
git checkout --theirs arquivo-conflitante.html
git add arquivo-conflitante.html
# 5. Finalizar merge
git commit -m "resolve: conflitos do merge"
3. PÓS-MERGE (Validação)
# Verificar se TODOS os commits chegaram
git log --oneline -5
# Verificar arquivos específicos
git show HEAD --name-only
# Testar localmente antes do push
python -m http.server 8000 # Verificar se funciona
🎯 Solução Para GitHub Pages Cache
Quando o GitHub Pages não atualiza:
# 1. Mudar nome do arquivo principal (FORÇA rebuild)
mv docs/index.html docs/dashboard-NOVO.html
# 2. Criar redirect simples
echo "<!DOCTYPE html><html><head><meta http-equiv='refresh' content='0; URL=./dashboard-NOVO.html'></head><body>Redirecting...</body></html>" > docs/index.html
# 3. Commit e push
git add docs/index.html docs/dashboard-NOVO.html
git commit -m "fix: força rebuild GitHub Pages com redirect"
git push
# 4. Após 5min, restaurar nome original
mv docs/dashboard-NOVO.html docs/index.html
git add docs/index.html
git commit -m "fix: restaura nome original após rebuild"
git push
🔧 Troubleshooting de Estados Travados
Git em rebase/interactive mode:
# Abortar rebase
git rebase --abort
# Resetar para estado limpo
git reset --hard origin/main
# Remover locks se necessário
rm -f .git/index.lock
Processos git travados (Windows):
# Matar processos git
taskkill /f /im git*
taskkill /f /im GitHubDesktop.exe
📊 Verificação de Sucesso
Após merge, verificar:
- ✅ GitHub Actions passando
- ✅ GitHub Pages atualizado (aguardar 2-5min)
- ✅ Testar URL atual com Ctrl+Shift+R (hard refresh)
- ✅ Confirmar que todos os arquivos da feature estão no main
⚠️ Checklists de Segurança
ANTES de fazer merge:
- [ ] Backup dos arquivos importantes
- [ ] Verificar diferenças entre branches
- [ ] Testar feature branch localmente
- [ ] Coordenar com time se aplicável
APÓS merge:
- [ ] Verificar se build passa
- [ ] Testar produção
- [ ] Documentar mudanças
- [ ] Informar stakeholders
🚨 Casos Especiais
Merge de grandes refactors:
# Fazer merge gradual
git merge feature/refactor --no-commit
# Verificar arquivo por arquivo
git status
git diff --cached
# Commit apenas quando confirmado
git commit -m "feat: merge seguro de refactor grande"
Rollback seguro:
# Reverter merge específico
git revert -m 1 MERGE_COMMIT_HASH
# Ou reset hard (cuidado!)
git reset --hard COMMIT_ANTERIOR
Lembrete: Sempre prefira merge --no-ff para manter histórico claro e evitar problemas com GitHub Pages!
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-merge-mastery-avoiding-merge-problems-mrzxurbc/download' --output '.skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc/SKILL.md.part' && mv '.skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc/SKILL.md.part' '.skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/git-merge-mastery-avoiding-merge-problems-mrzxurbc/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.