Cookie
Cookie

Reputation: 12672

How to undo bzr add

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.

Upvotes: 6

Views: 1252

Answers (2)

bialix
bialix

Reputation: 21473

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

Upvotes: 12

Cookie
Cookie

Reputation: 12672

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

Upvotes: 0

Related Questions