Amend a Local Commit in TortoiseGit Without Creating a Second Commit
Use TortoiseGit's Amend last commit to fold a missed file or typo into your previous local commit—only if it hasn't been pushed yet.
26 Jun 2026, 00:31 UTC

You committed too soon, and now you have two commits
You finish a change, commit it, and immediately notice a missing file or a typo in the message. The easy fix is a second commit—"forgot file" or "fix typo"—but that leaves your history cluttered. If the first commit exists only on your computer and has not been pushed to a remote, TortoiseGit can absorb the new changes into the previous commit instead.
Use the Commit dialog’s Amend last commit option. It stages your changes into the existing commit and replaces it with a new commit ID. The old commit is abandoned. This is safe only for local, unpushed work.
Check the history before you amend
Open TortoiseGit > Show Log from the folder’s context menu. Confirm that the commit you want to replace is the most recent one on your branch and that it does not appear on any remote or shared branch. A commit ID is the unique identifier Git assigns to each snapshot; amending generates a new ID, so the old one is effectively replaced rather than edited in place.
Worked example: fold a missed change into the last commit
- Edit the tracked file in your local working copy.
- Right-click the repository folder in Windows Explorer and choose TortoiseGit > Commit.
- Select the changed file so it is staged.
- Check Amend last commit.
- The previous commit message loads into the message box. Edit it if needed, then click Commit.
- Open TortoiseGit > Show Log again. You should see one commit at the top containing both the original content and your new change.
Compare the commit ID shown in Show Log before and after. A different ID with the same subject line means the old commit was replaced, not appended. If you see two commits, you made a new fix-up commit instead of amending.
Run this in Windows Explorer on your local repository folder. You need write access to the repository. The risk is staging unrelated changes by mistake; TortoiseGit will fold everything staged into the amended commit, so review the file list before clicking Commit.
Limits and when not to amend
- Already pushed or shared: Do not amend. Rewriting a commit others have pulled requires force-push coordination and can break their repositories.
- Unstaged work: Amend includes only staged changes. Unstaged edits are ignored, and TortoiseGit cannot recover work that was never committed.
- Menu variation: Checkbox placement and labels vary by TortoiseGit version. Verify the amend control in your installed UI rather than memorizing its position.
Amend changes repository state. TortoiseGit does not provide an undo amend button in the GUI. If you amend the wrong commit, the old commit becomes unreachable from the branch history. Verify with Show Log before you commit.
Closing check
Before amending, ask whether the commit has left your machine. If it has, make a new commit instead. If it hasn’t, use Show Log to confirm a single top commit, then amend with confidence.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.