I was recently uploading an update to one of my WordPress Plugins. It was a big update and I had changed the file structure. I ran into an issue where SVN doesn’t delete the old files on WordPress.org. The files aren’t synced sorta speak. So all my old files still remained even though they were unused.
Usually I’d connect to an FTP and just delete the old files.. SVN is new to me and I had no idea how to use it. I spent ages searching for a way to delete old files that are no longer represent in the local SVN repo. I came across this useful snippet.
SVN Delete missing files snippet
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )
The command searches for all files that are no longer present in your local SVN repo and then marks them for to be deleted. You still have to push your changes like nomral for them to take affect. Like so
svn ci -m 'Just cleaning up old files'
Have a look at the WordPress Developer Handbook for more SVN tips.I hope that helps anyone else who is doing WordPress plugin development!