Undo svn add without reverting local edits

前端 未结 4 1867
慢半拍i
慢半拍i 2020-12-22 20:43

I accidentally ran svn add * and added a bunch of files that shouldn\'t be in the repository. I also have local edits in some files that I want to keep. Is ther

4条回答
  •  星月不相逢
    2020-12-22 21:13

    You can fix your checkout in the following way:

    1. Backup your local files
    2. Revert the SVN checkout
    3. Restore the files

    -

    rsync -av --exclude .svn/ YOURDIR/ YOURDIR.bak
    svn revert -R YOURDIR
    rsync -av YOURDIR.bak/ YOURDIR 
    

提交回复
热议问题