Committing
The commit box sits under the file list on the Changes tab. Type a message, check who the commit is from, and press ⌘↵. Afterwards a toast offers Undo for a few seconds, and so does every merge, rebase, cherry-pick, revert, branch delete and stash drop.
Where to find it
- Changes tab (⌘1), the box at the bottom of the file list.
- Repository › Commit Staged Changes, or Command palette › Commit staged changes (⌘⏎).
The commit box
| Control | What it does |
|---|---|
| Message | A field with the placeholder "Summary of the change". The first line is the summary; anything after a blank line is the body. |
| Committing as name <email> | Who the commit will be from. The identity's label follows when one applies ("…, Work identity"). Click it to open Repository settings. If Git has no name and email set it reads "No Git identity is set. Pick one". |
| Amend | Folds the staged changes into the last commit instead of making a new one, and loads the last message into the field. |
| Commit button | Reads "Commit N files", or "Commit" when staging only part of a file, or "Amend with N files" and "Amend last commit" with Amend on. While working it says "Committing…" or "Amending…". When a commit can't go ahead, the button is disabled and its tooltip says why. |
⌘⏎ commits from anywhere on the Changes tab.
The identity check
If the repository's Git config commits as someone other than the identity its workspace (or its own setting) expects, an amber line appears in the box: "This repo commits as email." or "This repo's workspace commits as email." with a Use label button that writes the expected identity into the repository's config.
If you commit without fixing it, Mergepond asks: "Commit with the expected identity?", "This repo expects name <email>. You're committing as name <email>." The answers are Commit anyway and Use label, which writes the identity and then commits. See Git identities.
After the commit
A toast reads "Committed 1a2b3c4: summary" (or "Amended …") with an Undo button. Undo moves the branch back to where it was and leaves the changes staged, so you can fix the message or the files and commit again. The toast stays for nine seconds. Undo refuses if the branch has moved on since.
Undo in general
Mergepond records an undo entry for these operations and offers it in the toast that reports them:
| Operation | What undo does |
|---|---|
| Commit, amend | Moves the branch back; changes stay staged. |
| Merge, rebase, cherry-pick, revert | Moves the branch back from where the operation left it to where it started. Refuses if the branch has moved since. |
| Delete branch | Recreates the branch at the same commit. |
| Drop or pop a stash | Puts the stash back. |
| Delete tag | Recreates the tag. |
The commits an undo needs are kept under refs/mergepond/undo/, so Git's garbage collection can't remove them before you have had the chance. After an undo the toast reads "Undone: …".
Free and Pro
Committing and undo work the same on Free and Pro.