Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublicTeam
Assigneesstack72

Relationships

#1739 @swamp/git: no way to amend a commit, but push can --force

Opened by jeremy · 8/19/2026· Shipped 8/20/2026

@swamp/git can rewrite published history but cannot construct the rewrite. commit accepts only message, paths, and addAll — runCommit builds its argv from author config and the message, with no amend path — while push accepts force and passes a bare --force. So the destructive half of a history rewrite is reachable through typed methods and the constructive half is not.

The practical case: a commit lands with a message that does not match the repository's writing convention. Correcting it needs git commit --amend followed by a lease-checked push, and neither is expressible. The work drops out of the typed, evidence-producing surface and back to a human shell exactly when a careful, reviewable path matters most.

Two requests, and the second matters more than the first.

Please add a distinct amend method rather than an amend flag on commit. Amending rewrites history, so it should not be reachable by setting a boolean on the same call that makes ordinary commits; a separate method keeps the authority visible in workflow YAML and in run history. Useful arguments: a new message, optional additional paths to stage, and the option to keep the existing message when only the tree changes. It should refuse when there is no HEAD commit, and its result should record both the old and new SHA so a workflow can prove what was replaced.

Please also add forceWithLease to push. A bare --force overwrites whatever the remote holds; --force-with-lease refuses when the remote moved since the last fetch. For an agent-driven push that is the difference between a recoverable no-op and silently discarding someone else's commit. This is worth having independently of amend.

Both are additive and neither changes existing semantics.

Upstream repository: https://github.com/swamp-club/swamp-extensions

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/git@2026.08.13.1
  • swamp: 20260818.155936.0-sha.303cd93e
  • OS: linux (x86_64)
  • Deno: 2.8.3
  • Shell: /bin/bash
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 4 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

8/20/2026, 12:36:32 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/19/2026, 11:07:11 PM

Sign in to post a ripple.