Toolverse
All skills

github-commit-recovery

by gadievron

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

Quick info

Author
gadievron
Category
Security
Views
1

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

  1. 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.

  2. 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.

  3. Aby pobrać commit jako plik patch, użyj curl: curl -L https://github.com/org/repo/commit/FULL_COMMIT_SHA.patch

  4. 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.

  5. 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.

Related skills