Skip to main content

Moving from cvs to git

Yesterday, I spent almost the entire day improving my git knowledge and migrating all of my old software projects from cvs. I'll admit, I cheated a little since I only really cared about the latest 'release' of each project's codebase, I simply exported the latest from cvs and created a new baseline for it in git. Additionally, I am going to host the code in my Dropbox account so that the computers I use regularly will have access to the latest code (assuming I've pushed it from whatever computer I used last) and essentially, I get a free git code host with unlimited projects but unfortunately, not unlimited space.

First, I created my .gitignore, so I could add everything in the project without the unnecessary cruft clogging up my projects. You can download it, if you want. It basically tries to ignore all backup files, generated binary files, filesystem metadata (such as CVS dirs and Mac DS_Store) and any non-essential development environment files.

Here is the basics of what I did:
$ cd project_dir
$ git init
$ git add .
$ git commit -m "initial commit"
$ git clone --bare . ~/Dropbox/Git/Category/project_name.git

Repeated roughly 95 times. Not because I'm an idiot that can't write a script that would have done it at once, but because I was also retrieving from 5 different repositories and verifying if it was code that I wanted to keep and then placing the project into different categories:
  • Company: If I wrote a utility while working at a company for some reason and it doesn't make sense out of context otherwise.
  • Language: If I was exploring some language specific feature or library/api specific to that language, it was placed here. Examples include Java, C, Cpp, Ruby, Perl, Html
  • IDE: If the code will only build in a specific environment, I categorized it here. Examples include VisualStudio, Xcode.
  • Utilities/Apps: Anything I've written that has a point other than experimentation with language/technologies/apis.
So far, this is working quite well and is easy to manage. We'll see if it scales as I start doing larger projects but for now, I'm very happy.

Comments

Popular posts from this blog

Paradigm Switches

Sometimes in life, you just need to switch things up. You realize you've been doing things either just a little less efficiently or outright wrong and you just need to make a jump into something different... I hit this point over the last year and finally had the guts to make a major change. Yes, I bought a Mac Book Pro. Some background: I've been a Windows (and DOS before that) user since roughly the 5th grade (that would be 1984/1985-ish, eeek) and part time Linux user on and off since 1994.  Other than two years in college, I've used those platforms (and a little Solaris) exclusively -- that's 25 years of experience.  Twenty-five years of learning shortcuts, time savings, and overall comfort on a computing platform. All that experience, shaken up and shelved for now.  Well, sorta.  This is what I think so far: Pros: I LOVE the hardware.  Seriously. Dual video cards (one for low power, one for high performance) Upwards to 8 hours of battery life...

Favorite TV Shows of All Time

This is in response to: http://www.myextralife.com/sitenews/my-favorite-tv-shows-of-all-time/ The Simpsons Friends The Cosby Show Cheers House Mash Family Ties Nova Tonight Show (with Johnny Carson) Law and Order This Old House Alias As you can see, I was a kid in the '80's.