Previous: , Up: Branching   [Contents][Index]


6.5.4 Auxiliary Branch Commands

These commands are not available from the transient magit-branch by default.

Command: magit-branch-shelve

This command shelves a branch. This is done by deleting the branch, and creating a new reference "refs/shelved/BRANCH-NAME" pointing at the same commit as the branch pointed at. If the deleted branch had a reflog, then that is preserved as the reflog of the new reference.

This is useful if you want to move a branch out of sight, but are not ready to completely discard it yet.

Command: magit-branch-unshelve

This command unshelves a branch that was previously shelved using magit-branch-shelve. This is done by deleting the reference "refs/shelved/BRANCH-NAME" and creating a branch "BRANCH-NAME" pointing at the same commit as the deleted reference pointed at. If the deleted reference had a reflog, then that is restored as the reflog of the branch.