# subversion: sync edited working copy with repo



## Seeker (Apr 30, 2013)

After `# svn co ...`, I've edited few files, then added some custom files which aren't part of local working copy. Which command should I issue, in order to restore working copy, as I would: `# rm -R ...` and `# svn co ...`?


----------



## wblock@ (Apr 30, 2013)

Edited files can be reset to the original form with `svn revert`.  Added files can just be deleted.  If you've actually used `svn add` on them to get them under version control, use `svn delete` to delete them.


----------



## Seeker (Apr 30, 2013)

I've manually edited files in the working copy (`# svn revert -R` worked!) and via the cp utility copied files in it (svn utils *not* used). I need a solution for this case scenario. Now how to auto delete files listed with '?' by `# svn status`?


----------



## wblock@ (Apr 30, 2013)

That was it.  If you edit a file under svn(1)'s control, `svn revert [i]file[/i]` will remove those changes, reverting it back to the way it is in the repository.  New files that are not under version control can be manually deleted.  `svn stat` will show the status of files.


----------



## jb_fvwm2 (Apr 30, 2013)

Useful!  As if to illustrate...

```
/usr/ports/devel#  svn stat .     
?       ace/_many_build_errors
?       binutils/__ForcePkg_REgister_to_install
?       cgdb/_vi_keys_recc
?       imake/_buildwithgcc
?       libcheck/_info_check_pgmmg_or
?       p5-PAR-Packer/_sys_pp_conflict
```


----------

