github-commit-recovery
Recover deleted commits from GitHub using REST API, web interface, and git fetch. Use when you have commit SHAs and need to retrieve actual commit content, diffs, or patches. Includes techniques for accessing \
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Recover deleted commits from GitHub using REST API, web interface, and git fetch. Use when you have commit SHAs and need to retrieve actual commit content, diffs, or patches. Includes techniques for accessing \
How to use
Zdobądź SHA commita, który chcesz odzyskać. Źródłami mogą być GitHub Archive, git reflog, logi CI/CD, komentarze w PR-ach, referencje w issue'ach lub raporty bezpieczeństwa.
Jeśli masz pełny SHA, wejdź w przeglądarkę na adres https://github.com/org/repo/commit/FULL_COMMIT_SHA — GitHub wyświetli zawartość commita nawet jeśli nie należy do żadnej gałęzi.
Aby pobrać commit jako plik patch, użyj curl: curl -L https://github.com/org/repo/commit/FULL_COMMIT_SHA.patch
Do zapytań REST API użyj tokena autoryzacyjnego, aby zwiększyć limit z 60 na 5000 żądań na godzinę. Uwierzytelnienie jest szczególnie ważne przy masowych operacjach.
Pamiętaj, że GitHub przechowuje commity na serwerach na stałe — nawet force-push nie usuwa ich całkowicie. Wystarczy znać SHA, aby uzyskać dostęp do treści, diffów i metadanych.