svn: file is scheduled for addition, but is missing error Solution

First, the cause of the problem

If you add a new file myfile to a local warehouse, but you did not submit it to delete, then when you are ready to submit the file to the svn, you will get the following error:

svn: Commit failed (details follow):
svn: 'myfile' is scheduled for addition, but is missing

Second, the solution

1, Option One: Through svn revertthe myfile file command will restore the back have been removed

svn revert myfile

This online program is the most common solution is the most pit father's scheme, since I had regarded it deleted, I would also like egg pain reduction put it back, I can submit svn, it's not very pit operation dad do? If the deleted files are more, not in the same place, then this program is wearing them plan
2, Option Two: By svn delete --forceforcibly removed completely myfile file command

svn delete --force myfile

Executing the command, will be able to completely remove myfile, then resubmit svn, there will be an error

Third, extending discussed

1, if you need to submit the project to svn, there are many places that have the above-mentioned problems, you can svn status <文件夹>command them out and
Here Insert Picture Description
show! That file M is already added to the svn local warehouse, but it was deleted before submitting file
2, if you add the local repository to svn myfile was a directory, then you use the svn revertcommand to restore deleted files directories and subdirectories, then you need the following command:

svn revert myfolder --depth infinity

3. To avoid adding to the local svn repository has been deleted and cause an error occurs, we better not delete files deleted right system, but with the following command:

svn rm --force myfile
Published 36 original articles · won praise 9 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_43278826/article/details/103601527