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:
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:
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
Post a Comment