git-mastery
FeaturedAdvanced Git: rebase, bisect, reflog, cherry-pick, worktrees, LFS. Triggers: rebase, bisect, cherry-pick, reflog, force push, merge conflict, worktree.
AI & Automation 161 stars
21 forks Updated today MIT
Install
Quality Score: 93/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Git Mastery Skill
## ๐ก๏ธ Safety First Protocol
- **Never** force push to `main` / `master` / `develop`.
- **Always** use `--force-with-lease` instead of `--force`.
- **Always** create a backup branch before complex operations:
`git branch backup/feature-xyz-pre-rebase`
## Advanced Workflows
### 1. Automated Bug Hunting (Git Bisect)
Find the specific commit that introduced a bug.
```bash
# Start
git bisect start
git bisect bad # Current version is broken
git bisect good <commit-sha> # Version that worked
# Automate with test script
git bisect run pytest tests/test_failing_feature.py
```
### 2. Interactive Interactive Rebase
Clean up commit history before merge.
```bash
git rebase -i HEAD~n
```
- **squash**: Combine commits.
- **reword**: Fix messages.
- **dropped**: Remove junk commits.
### 3. Log Analysis
Visualize branch topology.
```bash
git log --graph --oneline --decorate --all
```
### 4. Recovery (Reflog)
Recover "lost" commits after a bad reset/rebase.
```bash
git reflog
git reset --hard HEAD@{n}
```
### 5. Cherry Picking
Pick specific commits from other branches.
```bash
git cherry-pick <commit-sha>
# If valid conflict
git add .
git cherry-pick --continue
```
## Commit Message Standard (Conventional Commits)
- `feat:` New feature
- `fix:` Bug fix
- `docs:` Documentation only
- `style:` Formatting (white-space, etc)
- `refactor:` Code change that neither fixes a bug nor adds a feature
- `perf:` Performance improvement
- `test:` Adding missing t...
Details
- Author
- softspark
- Repository
- softspark/ai-toolkit
- Created
- 4 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content โ not just same category
AI & Automation Listed
git-advanced-workflows
Advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog. Use when managing complex Git histories, collaborating on feature branches, or recovering from repository issues.
38 Updated today
rjmurillo AI & Automation Solid
git
Git operations and worktree management
15 Updated today
jmylchreest Code & Development Solid
git-master
Git expert for atomic commits, rebasing, and history management with style detection
6 Updated today
mazenyassergithub