I love SVN. It frequently saves my life when I go to update one of my sites and end up crashing the whole thing. Hopefully all the developers out there are using SVN too. If not you really should head over to and get dirty with it (I may make a post later about creating/adding repositories, but I think that is pretty well documented). One of the daily issues I face is that Dreamweaver forgets to tell SVN that I added or removed a file. I work in Dreamweaver about 80% of the time when I am coding for a website (the rest the time I use VIM on my Fedora box), and I use their built in FTP to manage files. Lets take todays example where I am checking in a new version of a template for a site that involved deleting and adding tons of images. Heres what my svn st looks like:

?      images/st.gif
?      images/wt.gif
?      images/lb.gif
?      images/lc.gif
?      images/nav.png
?      images/lt.gif
?      images/sb.gif
?      images/sc.gif
?      images/wb.gif
?      images/wc.gif
!      images/product_1.jpg
!      images/shadow_l.png
!      images/shadow_bl.png
!      images/shadow_r.png
!      images/shadow_br.png
!      images/shadow_t.png
!      images/nav_buttons
!      images/nav_over.png
!      images/shadow_tl.png
!      images/shadow_tr.png
!      images/nav_inactive.png
!      images/nav_active.png
!      images/shadow_b.png
M      teamr4r_add.php
M      css/tr4r.css
M      css/main.css
M      index.php
M      functions.php
M      teamr4r.php

Checking this stuff in right now would be a newb mistake. We need to add all the files with a ? and delete all those files with ! from our repository on the next check-in. Maybe I have ADHD or maybe I just like saving time, but either way I found this cool trick online a long time ago to quickly clean this kind of mess up (sorry to the person that shared it, but I forogot who you are). I have two really useful entries in my ~/.bash_profile that helps me to check-in a lot quicker. I used to use svn add –force * to add all the files, but that’s a couple more letters of typing than I would like so I added these aliases:

alias svnadderall="svn st | grep '^?' | cut -b 8- | xargs svn add"
alias svnridallin="svn st | grep '^!' | cut -b 8- | xargs svn rm"

So what on earth do they actually do? Hopefully you understand what svn st does, look at the man svn pages for help if you don’t. We then pipe that output to our buddy grep, which will find every line that starts with a ? and output that. So we then pipe that cut that output’s first 8 characters (the ? and the spaces after it) so that all that is left is the filenames of each of the files that we want to add to the repository, each on their own line. That ouput is thrown over to xargs, which will take each line and pass it as a parameter to the following command. Since we want to add each of those files to the repository, we run svn add on each line and we are done! svnridallin does the same kind of thing, but instead it finds all our ! files (files that we deleted but forgot to tell SVN about) and runs svn rm on them. After quickly typing svnridallin and svnadderall, we can finally run our svn ci -m “thanks aliases!”.

These two little aliases may not save a ton of time, but I found them to be quite useful. I use them all the time now. If you end up using them or if you find another useful SVN trick, drop me a comment and let me know!

Written For Nerds


If you were looking for a page about me, you can find that on This page is really just about the blog.

So what on earth is this blog all about? The web is full of trashy blogs with people posting about their own personal crap that no one ever reads, I don’t want to write another one of those blogs. I want this blog to be useful to the people that read it. Who do I expect to read it? You! Most likely you are a client of mine, a friendly face in the web design and development industry, or just one of my friends wanting to see what the hell I am doing with my life. Even if you don’t fit into my top 3 audiences, I want to make this blog interesting for you. I may make some very techy posts aimed right at my fellow designers and developers, but don’t worry normal web browsing friends, I will make sure I sort away the techy posts in a category titled something like “For Nerds”. I will also try to write a bunch of posts “For The Average Joe” that will try to give everyone some tips or tricks on how to use the web just a little bit better and can hopefully save everyone some time.

I don’t see most my posts being this short and sweet because hopefully I’ll be explaining things to some depth that teaches you something new, at least that may be a goal. I think its fun to learn something new everyday. So subscribe to my RSS feed (if you don’t know how to do that or don’t know about RSS you really should head over here) and hopefully you can find something here that is worth spending the two minutes to read. Oh, and don’t forget to comment! Thanks and I hope you enjoy my stuff!

Written Uncategorized