Putting a project in Eclipse under source control
I'd like to know a step-by-step procedure for a noob on how to create a hello world project in Eclipse that is Subversion/Mercurial/Git integrated. I know this is easy, but I am unsure how to do it.
I've:
- downloaded helios and put it on a local folder.
- created a new java project on directory "C:\workspace\tests".
- added a new Main.java file with a hello world message as it contents. The full filename is "C:\workspace\tests.java".
- now I'll want to change the "hello world" message to "bye world", but I'll want to be able to revert back to the previous message if needed. I need some kind of version control!
What are from this point on the baby-steps I must following to have this already created project and its files under subversion / git / mercurial version control? This shouldn't be about more complex matters, only how to add a simple existing project to source control on our own machine through eclipse!
Put the links to all the software that'll have to be installed, 开发者_如何学编程if you please. This is supposed to be a tutorial for total noobs at version control.
edit: i don't know how to make this CW. Could anyone do that?
First you need the appropriate provider installed for your versioning system.
Then the first step from there is right-clicking on the project you want to put under version control, and choosing Team -> Share. What happens then is provider-dependent.
Subclipse is a great plugin for Subversion.
Subclipse.tigris.org
You will need an existing Subversion client to use it.
I will assume you are using Windows based on your drive letter. Tortoise SVN is another good tool that you can use in Windows Explorer rather than inside of Eclipse. This is a more universal approach to Subversion.
tortoisesvn.net
I would personally recommend Git for version control, but I don't know of any good Eclipse plugins for it off the top of my head.
精彩评论