6

Sometimes I type bzr add and don't notice that I am not in the root of the branch but an ignored sub-folder. This then adds all files in that folders - often it is a build folder, with lots of files. Hence the question: how to undo a bzr add.

Cookie
  • 12,004
  • 13
  • 54
  • 83

2 Answers2

12

There is built-in way without need of xargs: bzr remove --new --keep

bialix
  • 20,053
  • 8
  • 46
  • 63
0

This answer is shamelessly stolen from here to make it more accessible (to me as well).

This will undo an erroneous bzr add:

bzr added -0 | xargs -0 bzr rm --keep

Cookie
  • 12,004
  • 13
  • 54
  • 83