amend-push

Amend the previous commit and push changes to a remote repository.

114|29|Updated Nov 23, 2019
One-click install
npx skills add https://github.com/helderberto/dotfiles --skill amend-push
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: amend-push
Source: https://github.com/helderberto/dotfiles/tree/main/claude/.claude/skills/amend-push
Command: npx skills add https://github.com/helderberto/dotfiles --skill amend-push

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers avoid disrupting history by safely amending the previous commit and pushing to a remote repository.

Core Features & Use Cases

  • Amend specific files or all staged changes in the last commit.
  • Push updates only on non-protected branches and require upstream tracking.
  • Use --force-with-lease for safe updates and provide clear status feedback.

Quick Start

amend-push file1.ts amend-push -a amend-push -e file.ts

Frequently Asked Questions about amend-push

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

FAQPage Schema
How do I amend a git commit and push without disrupting remote history?

To amend a commit and push safely, use git --force-with-lease to update the remote branch. This verifies your local tracking is current, preventing you from overwriting changes pushed by collaborators.

Can I amend only specific files into the last commit before pushing?

Yes, you can amend specific files into the last commit. The skill allows selecting individual staged changes or specific files like file.ts to include in the amended commit before pushing.

When should I use git force-with-lease instead of force push?

Use git force-with-lease instead of a standard force push when amending commits to ensure branch safety. It checks your local remote-tracking branch against the actual remote, rejecting the push if new commits exist upstream.

Does git amend-push work on protected branches?

No, amending and pushing does not work on protected branches. The workflow enforces safety checks that restrict this operation to non-protected branches and requires upstream tracking to be confirmed.

What is the best way to safely amend all staged changes and push to a remote?

The best way to safely amend all staged changes is to use the amend-push operation with the -a flag. It bundles all staged modifications into the previous commit and pushes using force-with-lease for safe remote updates.