Edit 8/15/2012 – This is now available collected into a single ebook for your kindle. Only a buck. Version Control for Authors
Continuing the series talking about Version Control, and how authors can use it. It’s a big enough subject that I felt it best to split it into five uneven parts. I’ll update these to be links as each part is posted.
- Part I: What is Version Control and Why Should Authors care?
- Part II: Getting Started
- Part III: Get Your Stuff Back
- Part IV: Questions & Tips <- You are here
- Part V: Addendum
Part IV: Questions & Tips
Here are some questions you might have asked if we had been face to face this whole time.
Can I have one repository for each project?
Of course. There are at least three good reasons why you might want to do this.
- You have very complex projects
- If you jump around between your writing projects a lot
- If you expect to often be rolling back individual projects
Here’s how I would organize things if I were doing them this way.
Start by creating a “Fiction Repositories” directory, and then create a new empty directory for each project.
Then in each of the new empty directories, create a repository by right clicking, then in the popup menu selecting TortoiseSVN > Create Repository Here, then click OK.
Now create a working directory and check out the empty project into it by right clicking then on the menu selecting SVN Checkout. Here’s where you’ll start to need to be careful. TortoiseSVN remembers the last repository you checked out enters that information into the “URL of repository:” field. If you hit the dropdown menu, it brings up a list of other repositories that you have checked out before.
When you start creating a bunch of repositories, sometimes they don’t show up on the list, especially if you haven’t used the repository yet.
If you click on the “…” button while there is something in the field to the left, the Repo-browser springs to life and lets you select a previous version of the selected repository.
That’s not what you always want, so just select and erase the text in the “URL of repository” field, and then click the “…” button to the right.
You can now use your working directory by dropping in files and editing files like you did before. Remember to commit.
You can make a new working directory for every project that you’re currently working on. I would probably just put all the checked out repositories into directories that all sit in a Fiction Working Directory.
If you choose to work with multiple directories, you’ll just have to get used to selecting the right repository any time to use TortoiseSVN to do anything.
So, yeah, this is a bit more work. I think most of the time fiction authors can deal just fine with one repository.
What if I don’t want to see everything that’s in my repository in my fiction working directory?
The solution is easy – only check out the project folders you want to be using.
Yes, we’re skipping back and assuming that you have all your fiction projects in a single repository.
Before you do this, make sure all changes and new files have been committed to the repository. Now delete the contents of your fiction working directory. In fact, why don’t you just nuke the whole directory and create a new one.
Right click on your new fiction working directory and click “SVN Checkout.”
In the checkout window, click “Choose items.”
Now, as long as you’ve been at least mildly organized in your project creation (I keep mine one book/story per directory) you should have no trouble selecting which projects you actually want in your Fiction Working Directory.
Once you click OK, you are taken back to the main checkout window and you’ll notice the “Checkout Depth” has changed.
After you click OK again, TortoiseSVN will get to work copying only your chosen projects into your Fiction Working Directory. You can now work on those projects and add new projects the same as you did before.
What if I get sick of using this system, but I don’t want to hunt down all the .svn files that are in every stinking directory?
All you need to do is use the Export command rather than the “SVN Checkout.”
In other words, create yourself a new directory. Right click on it and go to TortoiseSVN > Export.
You’ll get a window that looks similar to the checkout window. Just OK and TortoiseSVN with serve you up a copy of your repository sans .svn file folder things.
Next time I’ll wrap up by talking about something that is not Version Control per se, but still of utmost importance.
[...] Next Installment of Versioning for Authors! August 9, 2012 by J Dane Tyler The next installment of the gripping series “Version protection for Authors†is up on Bryce Beattie’s blog! Check it out here! [...]