Undo a check-out¶
Undo Check Out gives up your check-out without publishing. Use it when you checked out a file but decided not to keep your changes, or checked something out by mistake. (In earlier versions this action was called "Release Lock".)
Prerequisites¶
- You have the file checked out (Checked out by me).
Steps¶
- In the Files tab, right-click the file → Undo Check Out.
- If you have unpublished local versions on that file, GitM warns you that this will discard them, because they were never published. Confirm only if you're sure.
Expected result¶
- The check-out is released; the file returns to Available and read-only.
- Any unsaved working-tree changes and unpublished local versions for that file are discarded.
Undo Check Out vs. Check In¶
| You want to… | Use |
|---|---|
| Keep and publish your changes | Check In |
| Keep a local checkpoint, keep editing | Save Local Version |
| Give up your changes and hand the file back | Undo Check Out (this page) |
"Undo Check Out" is not "Release." Release now means stamping a revision (Rev A, B, C…) — see Release a revision. Giving up a check-out is Undo Check Out. The two are unrelated.
Undo all check-outs¶
To hand back everything you have out at once, use Undo all check-outs in the task-pane ⋯ overflow menu. It discards uncommitted edits and undoes every check-out you hold.
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
| Warning about discarding "N unpublished local versions" | You have Save Local Version checkpoints not yet checked in. | Cancel and check in if you want to keep them. |
| "You're offline — Undo Check Out needs a connection" | The check-out lives on the server, so it can't be undone offline. | Reconnect, then retry. See Work offline. |
| Undo Check Out fails | Couldn't reach the LFS lock server. | Check your connection; retry. |
Known limitations¶
- Undoing a check-out is destructive to unpublished work by design — it reverts the file to its last published state. There's no undo.
- If a teammate is unreachable and holding a check-out, you can't undo it yourself; an admin must force-unlock.