SuperAPI AI Directory

amend-push

General & other

View repository

Updated 10-16 05:50

About this skill

Amend and Push

Context

Stage changes, amend the previous commit, and force push to remote.

Workflow

  1. Check git status
  2. Verify current branch (never force push main/master)
  3. Stage specified files (or all with -a)
  4. Amend previous commit:
    • Use --no-edit to keep message
    • Or allow editing if requested
  5. Force push with --force-with-lease for safety
  6. Show result and final status

Safety Rules

  • NEVER force push to main/master branches
  • Use --force-with-lease instead of --force
  • Verify branch has upstream tracking