If you are a web or application developer, there will come a time (hopefully) that you will need to use subversion for your projects. While I use the command line for this – there are some GUI applications that make it easy for people to manage their files using subversion. For this documentation, I have chosen to write about RapidSVN because it runs on both Mac and PC.
ONE TIME PROCESS
- Download the RapidSVN you will use to check in and check out files at: http://www.rapidsvn.org/download/release/0.9.6/. For Mac users – download the .dmg gile. For PC users, download the .exe file
- Install the applications on your computer.
- Check out the files that you want to edit. Go to the “Repository” menu and select “checkout”.
- Enter in the URL of the repository where the files are currently located. (http://www.example.com/svn/yourfiles)
- Choose where you want these files on your to be downloaded to on your computer (destination directory)
- Use the latest revision (unless you have a reason to choose something else)
- Do not worry about “Peg Revision” – Click the “Ok” button
- You will be prompted for a user name and password – those are for the repository. Enter in the information and your files will then be downloaded to your computer.
AFTER YOU HAVE INITIALLY CHECKED OUT THE FILES AND ARE READY TO MODIFY THEM
- Make changes to the existing files as needed. Once you are done, click on the icon for “Commit Change”. (Look for the up orange arrow).
- Enter in some documentation of the change. (Ex: I changed the CSS so that the navigation now works in IE 6)
- Click the “OK” button and your changes are now made to the files in the repository.
ADD NEW FILES
- Add the new files/folders to your local (on your desktop) copy of the files.
- Within RapidSVN – Click on the bookmark you want to work with on the left side of the window. On the right side – the files for that bookmarked repository will appear. You will see all your files – old and new.
- Highlight the new files you added and click on the “Add Selected” button.
- You will be prompted for a comment (explanation). (Ex. Added new graphic files for the header)
- Check those new files in by clicking on the “Commit Change” button. Add another comment. (Ex. Checking in the new graphic files).
DELETE EXISTING FILES
*** Regardless of what happens – DO NOT DELETE CHECKED IN FILES USING YOUR OPERATING SYSTEM’ DELETE OPTIONS (move to trash, etc). If you want to delete a file from the repository – you must use SVN. If you delete the files with your OS – you will get errors which will stop all future edits until it is remedied. You might see a folder with a name of “.” do not worry about it, remove it, or try to delete it.
*** You can only delete files that have already been checked in. If you add files, do not check them in, and want to delete them – you can use the OS to delete the files.
- Within RapidSVN – Click on the bookmark you want to work with on the left side of the window. On the right side – the files for that bookmarked repository will appear.
- Highlight the file you want to delete and click on the “Delete Selected” icon. The file will still be listed until you check in your changes.
- Check in your changes by clicking on the “Commit Change” button. Add a comment. (Ex. Removed old logo file). 4. The list of files will now be updated.