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

Barnes & Noble Nook WiFi review -- Engadget

I love my Kindle and evangelize it at every opportunity. Often people get to know me as the "eReader guy" and come to me for advice regarding the gadgets. Whenever someone asks me the "Kindle or Nook" question, my response has always been the same: They both are so close in features, some minor points in each device's favor, but overall, I feel like the Kindle beat a Nook in almost every way. I think that has all changed in the current landscape. I've always said I thought the Kindle's keyboard was a vestigial tail and is a design compromise at best. The new Nook really thumbs its nose at the Kindle's aging design choices and I hope this major failing is resolved with the next generation of the device. The size and shape of the device, the soft, contoured back, and the touch screen are all exceptional bragging points for the new Nook and I really like the improvements over their first generation device. I wish Kindle took as large a leap for...

The Smart Alec Backpack is cooler than you. Even cooler than: TOM BIHN

Photo curtesey of Tom Bihn and user maverick Ordered a new backpack . I'm kinda geeky excited. I've owned one of Tom Bihn 's messenger bags before, and I can attest to the quality of the workmanship and attention to detail. I went with the Smart Alec over a Timbuk2 H.A.L. 2011 for both the simplicity of design and more importantly, molecularity of the inside; I can attach dedicated laptop protection or remove it for maximum empty volume for hiking or other activities. Now I have to wait for it to arrive!