Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有时我输入bzr add并没有注意到我不在分支的根目录中,而是在一个被忽略的子文件夹中。然后,这会将所有文件添加到该文件夹中 - 通常它是一个包含大量文件的构建文件夹。因此问题是:如何撤消bzr add.
bzr add
有不需要 xargs 的内置方式:bzr remove --new --keep
bzr remove --new --keep
这个答案是无耻地从这里偷来的,以使其更容易获得(对我来说也是如此)。
这将撤消错误的bzr add:
bzr added -0 | xargs -0 bzr rm --keep