git

Navigate Git commit history and recover deleted files using standard Git commands.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/karstenheld3/SharePoint-GPT-Middleware --skill git-karstenheld3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git
Source: https://github.com/karstenheld3/SharePoint-GPT-Middleware/tree/main/.windsurf/skills/git
Command: npx skills add https://github.com/karstenheld3/SharePoint-GPT-Middleware --skill git-karstenheld3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers quickly navigate Git history and recover accidentally changed or deleted files, reducing debugging time and risk of data loss.

Core Features & Use Cases

  • Commit history navigation: view recent commits, inspect diffs, and track changes across branches.
  • File recovery: restore deleted or overwritten files using reflog, checkout, and patch workflows.
  • Audit and debugging: trace changes for code reviews and incident investigations across repositories.

Quick Start

Run a guided example: display the last 5 commits in one line each and show the files touched; if a file was deleted, use reflog to recover it.

Frequently Asked Questions about git

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover a deleted file from Git history?

Recover deleted files using Git reflog to find the commit where the file existed, then checkout that version. Git reflog tracks all HEAD changes, allowing you to pinpoint and restore files even after commits are removed from the visible history.

How do I view the commit history and see what files changed?

Use git log to display commits and git diff to inspect file changes between commits. Git log shows recent commits in sequence, and diff reveals exact modifications, helping you audit changes across branches and track code evolution.

Can I recover a file that was overwritten in a previous commit?

Yes, use git show to display the file's content at a specific commit, then git checkout to restore it. This workflow applies to accidentally overwritten or modified files across local and remote repositories.

What's the best way to trace changes for a code review or incident investigation?

Navigate Git history with git log and git diff to inspect commit-by-commit changes and identify when issues were introduced. This deterministic approach enables thorough audits of code modifications across your repository.

Do I need a Git-enabled environment to use these recovery techniques?

Yes, this skill relies on standard Git commands (log, diff, show, checkout, and reflog) and requires a Git-enabled repository. All operations are deterministic and work on both local and remote repositories.