This happens to me a lot. I’ll be working away on some test application in Eclipse, and after a bit of tinkering I’ll realize that the code is actually good enough to commit into the repo. So what do you do?
Well back when I didn’t know anything about Subclipse, I’d actually checkout the repo as a project, copy my code into the project, then do a SVN commit. Its convoluted, its annoying, and its stupid.
There’s actually an easier way to add projects to svn control, and I only had to bug Derek 1000x to find out!
- In the Package Explorer, right-click on the package, and go to Team -> Share Project…
- Work through the wizard that comes up, its pretty basic, select the kind of repo (CVS/SVN), select or add your repo, etc.
- When you’re done, the project will be linked with the repo. You can now Commit/Team Synchronize project files to your heart’s content!