Search code examples
bazaar

bzr shelve some files that are being worked on


Lets say I have 6 files that I'm working on and I only want to shelve 3 of the 6

  1. Is this correct bzr shelve file1.txt file2.txt file5.txt -m "this is the thing"

  2. How do I unshelve it later?

  3. How do I delete the shelve if I do not need it?


Solution

  • Is this correct bzr shelve file1.txt file2.txt file5.txt -m "this is the thing"

    Yes, that's correct. It will shelve the changes to the specified files and directories only. Furthermore:

    • If there are no changes in those, it will do nothing, just tell you No changes to shelve.
    • To skip the interactive questions for every change in those files, the --all flag is convenient, for example: bzr shelve file1.txt file2.txt file5.txt -m "this is the thing" --all

    How do I unshelve it later?

    Find the id of the shelf with bzr shelve --list. Then unshelve with bzr unshelve THE_ID. Btw, if you don't specify an id, then bzr unshelve will unshelve the most recent shelf.

    How do I delete the shelve if I do not need it?

    Using the --delete-only flag of bzr unshelve, for example:

    bzr unshelve --delete-only THE_ID