'forget' the recently added files

Erik Bågfors zindar at gmail.com
Thu May 25 17:32:36 BST 2006


On 5/25/06, Joris Putcuyps <joris.putcuyps at skynet.be> wrote:
> Aaron Bentley wrote:
> > Joris Putcuyps wrote:
> >>> Hello everybody
> >>>
> >>> After issuing the 'add' command, I sometimes notice files were added
> >>> which were hidden from me.
> >>> How do I forget those files, without using the 'remove' on each file?
> >
> > If you haven't made any other changes, you can use 'revert'.
> >
> > To reduce the risk of accidental adds, you can specify particular
> > subdirectories, or particular files.
> >
> > Perhaps we should add a '--new' option to remove that would cause it to
> > remove all newly-added files.
> >
> > Aaron
> In the past I've used the revert, but, I think it was with an older
> version, this resulted in lost files ( bzr init, bzr add, oops.. wrong
> files, bzr revert, no more files :( )
> I don't know if it's with mercurial or another VCS which had the command
>  'forget' to undo the 'add'.


Isn't it just remove

: [bagfors at zyrgelkwyt]$ ; bzr help remove
usage: bzr remove FILE...
aliases: rm

Make a file unversioned.

This makes bzr stop tracking changes to a versioned file.  It does
not delete the working copy.



: [bagfors at zyrgelkwyt]$ ; bzr init

: [bagfors at zyrgelkwyt]$ ; touch a

: [bagfors at zyrgelkwyt]$ ; bzr add
added a

: [bagfors at zyrgelkwyt]$ ; bzr st
bzradded:
  a

: [bagfors at zyrgelkwyt]$ ; bzr remove a

: [bagfors at zyrgelkwyt]$ ; ls
a

: [bagfors at zyrgelkwyt]$ ; bzr st
unknown:
  a

/Erik




More information about the bazaar mailing list