I'm finally getting around to checking my website project into a subversion repository. Version-control software confuses me, so I've been remiss in this essential part of project maintenance. The specific issues that stoke my procrastination: subversion didn't work on Dreamhost until very recently, I can never remember to tell it what files I've created/deleted, and I always get confused about how to set shell variables in OS X. This is for my personal reference, but I'm putting it out there just cuz.
- Figuring out what files have been added or deleted: if you add a new file to the project or delete a versioned file, you have to explicitly tell the system about it, for reasons I don't understand. To do this, use the command
svn status
to get a list of changed files. A?
next to the file means the file isn't under version control, which means you added it after you imported the project. A!
next to the file means it's missing, so you probably deleted it. For each added file, typesvn add path/to/file
and for each deleted file, typesvn delete path/to/oldfile
. The changes will be reflected in the repository at the next commit, I believe. (I'm getting this from a MacDevCenter article.) - If you want to rename a file, it looks like the best way to do that is to use
svn rename path/to/oldfile path/to/newfile
to do the actual renaming itself. If you rename the file and then try to tell svn that, it will tell you that the old file doesn't exist. This is inconsistent, but hey. - Setting default editor for revision notes: open up
~/.bash_profile
and add the lineexport EDITOR=/usr/bin/nano
. Then If you don't do this, and forget to give it a message when you commit, it'll open up vi, and that's not fun. But basically, you press 'i' to get to the point where you can enter text like a normal editor, press 'esc' when you're done, and then type:x
to save and exit.