Is there a way (in code or configuration) that I could prevent google analytics from collecting visits on any of my development websites?
I am assuming that you are referring to Bots or Crawlers. If that is true you can add a robots.txt file. Visit http://www.robotstxt.org/faq/prevent.html to know more about it.
If you are in fact referring to the Google Analytics, you can just disable the module or remove the tracking code if you have added it manually.