HG(UNSHELVE)
β¨ HG(UNSHELVE) β¨
okay bestie, so you know how you shelved your whole entire vibe earlier and now you need it back?? that's this. hg unshelve is the unshelve command from the hg manual, and it's literally here to restore a shelved change to the working directory π«Ά
πΈ SYNOPSIS πΈ
hg unshelve [OPTION]... [[-n] SHELVED]
π DESCRIPTION π
so basically this command takes an optional name of a shelved change to restore. no name? no problem. it just grabs the most recent shelved change instead. the way that it just knows which one you meant π
if a shelved change gets applied successfully, the bundle that contains the shelved changes gets moved to a backup location: .hg/shelve-backup. iconic behavior, honestly.
now here's the part where we get a lil real. since you can restore a shelved change on top of an arbitrary commit, it's totally possible that unshelving will result in a conflict between your changes and the commits you're unshelving onto. it's giving messy. if that happens, you must resolve the conflict, and then use --continue to complete the unshelve operation. and bestie, listen β the bundle will not be moved until you successfully complete the unshelve. so don't go anywhere π
(alternatively, you can use --abort to abandon an unshelve that causes a conflict. this reverts the unshelved changes, and leaves the bundle in place. a lil escape hatch, we love her.)
oh and also β if a bare shelved change (that means without interactive, include and exclude option) was done on a newly created branch, it would restore branch information to the working directory. cute, right?
after a successful unshelve, the shelved changes are stored in a backup directory. only the N most recent backups are kept. N defaults to 10 but can be overridden using the shelve.maxbackups configuration option. yes, you can change it, go off β¨
timestamp in seconds is used to decide order of backups. more than maxbackups backups are kept, if same timestamp prevents from deciding exact order of them, for safety. safety first, always π
selected changes can be unshelved with the --interactive flag. the working directory is updated with the selected changes, and only the unselected changes remain shelved. but β note: the whole shelve is applied to working directory first before running interactively. so this will bring up all the conflicts between working directory and the shelve, irrespective of which changes will be unshelved. yeah. all of them. no cap π
π OPTIONS π
-a,--abortβ abort an incomplete unshelve operation. peace out, we're not doing this today π-c,--continueβ continue an incomplete unshelve operation. pick up where you left off, queen π-i,--interactiveβ use interactive mode (EXPERIMENTAL). experimental besties, tread carefully π-k,--keepβ keep shelve after unshelving. why not have both honestly π-n,--name<NAME> β restore shelved change with given name. call her by name, she'll come π¦-t,--tool<VALUE> β specify merge tool. for when the merge needs a lil professional help β¨--date<DATE> β set date for temporary commits (DEPRECATED). old and busted, but she's still here π₯²
fr fr, don't skip the conflict part.--continueand--abortare your besties in a crisis. periodt.
that's the whole page, babes. this was the <code>HG(UNSHELVE)</code> manual β hg's unshelve command, dated <strong>2024-09-02</strong>. k bye, go unshelve something πβ¨
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms