Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"unadd" a file to svn before commit

Tags:

svn

I was in the middle of doing a recursive svn add/commit, and a folder which did not have the proper ignore properties was included. I've got about 100 uploaded binary files versioned now, but I haven't committed yet.

What is the easiest way to 'undo' this, without deleting all the documents?

like image 965
Lowgain Avatar asked Oct 10 '22 17:10

Lowgain


People also ask

How remove file from SVN commit?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

What is SVN revert?

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes.

Does SVN allow removing commits from history?

The simple answer is "no", because Subversion doesn't know how to resolve the case when you add a commit, someone else updates their checkout, and then you remove the commit from history. There might or might not be a complex answer involving surgery on the Subversion storage.


1 Answers

Use svn revert --recursive folder_name


Warning

svn revert is inherently dangerous, since its entire purpose is to throw away data — namely, your uncommitted changes. Once you've reverted, Subversion provides no way to get back those uncommitted changes.

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.revert.html

like image 247
Julien Lebosquain Avatar answered Oct 19 '22 11:10

Julien Lebosquain