askill
git-workflow

git-workflowSafety 85Repository

Git version control workflows. Load when hook output shows vcs=git (not jj). Use when squashing commits, rebasing feature branches, or doing git operations in non-jj repos.

4 stars
1.2k downloads
Updated 3/8/2026

Package Files

Loading files...
SKILL.md

Git Workflow

Safe, non-interactive approaches for squashing commits and rebasing feature branches.

Tip: If jj is available (jj root succeeds), prefer jj-workflow—it's simpler and has automatic safety via oplog.

Squash N Commits

git reset --soft HEAD~3
git commit -m "Your consolidated message"

That's it. The --soft flag keeps your changes staged and ready to commit.

Rebase Feature Branch

Update dev first, then rebase:

git fetch origin dev && git checkout dev && git pull
git checkout my-feature
git rebase --committer-date-is-author-date dev
git push -f origin my-feature

The --committer-date-is-author-date flag puts your feature commits on top chronologically.

Key Safety Rules

  • Never rebase shared branches — only rebase local feature branches
  • Check git status first — ensure no uncommitted changes
  • Create a backup branch: git branch backup-$(date +%s)
  • Review changes before committing: git diff --cached

Pre-Commit Hook Changes

If hooks modify files during commit, stage and amend:

git add .
git commit --amend --no-edit

When Things Go Wrong

git rebase --abort              # Stop rebase, go back
git reflog                      # See recent commits
git reset --hard <commit-hash>  # Recovery

See REFERENCE.md for detailed workflows and troubleshooting.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

78/100Analyzed 3/8/2026

A practical Git workflow skill covering squash, rebase, and recovery commands with clear safety guidelines. Well-structured with actionable steps and when-to-use guidance. Located in dedicated skills folder. Slightly limited completeness due to referenced external file. Tag mismatch (github-actions for git workflows). Good general-purpose utility despite internal path suggestion.

85
85
80
65
80

Metadata

Licenseunknown
Version-
Updated3/8/2026
PublisherTrevorS

Tags

github-actions