Git

Manage and repair Git repositories with commits, branches, merges, and rebases.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/adiytharpansa/openclawuserland --skill git-adiytharpansa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Git
Source: https://github.com/adiytharpansa/openclawuserland/tree/main/skills/git
Command: npx skills add https://github.com/adiytharpansa/openclawuserland --skill git-adiytharpansa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps teams and individuals avoid destructive Git operations, resolve merge conflicts, recover lost commits or branches, and apply consistent branching and push practices so repository history remains reliable and auditable.

Core Features & Use Cases

  • Safe operations & push guidance: Guidance on pull/rebase before push, using --force-with-lease, and branch hygiene to prevent accidental overwrites.
  • Conflict resolution & recovery: Patterns for resolving merge and rebase conflicts, using reflog to find lost commits, and instructions for restoring deleted branches.
  • Workflow and collaboration: Feature branch and hotfix flows, code review preparation, and practices for minimizing review friction and CI failures.
  • Use Case: Recover a mistakenly deleted branch using reflog, prepare a feature branch for a clean pull request, or safely rebase unpublished commits without disrupting teammates.

Quick Start

Inspect the current repository for divergent branches, identify any lost commits or unsafe forced pushes, and provide a step-by-step recovery and safe synchronization plan without rewriting shared history.

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 branch or lost commits in git?

You can recover a deleted branch or lost commits in git by using the reflog command to locate the commit hash and restoring it with git checkout. This pattern retrieves history without rewriting shared remote branches.

What is the safest way to force push without overwriting remote changes?

The safest way to force push without overwriting remote changes is using git push --force-with-lease. This safety check prevents accidental overwrites by aborting the push if the remote branch has new commits since your last fetch.

How do I resolve merge conflicts during a git rebase?

Resolve merge conflicts during a git rebase by manually editing the conflicted files, staging the changes with git add, and continuing the process using git rebase --continue. This integrates unpublished commits while maintaining branch hygiene.

Can I safely rebase unpublished commits without disrupting teammates?

Yes, you can safely rebase unpublished commits without disrupting teammates because the commits exist only on your local repository. Rebasing local history before pushing avoids rewriting shared remote repository history and prevents CI failures.

What's the best way to prepare a feature branch for a clean pull request?

The best way to prepare a feature branch for a clean pull request is to pull and rebase against the target branch. This feature branch flow minimizes review friction and ensures CI failures are resolved before merging.