3

I have /src/main/ with all my code (i also have /src/online, /src/prvlibs, /src/test, etc) but now i am thinking about moving a few non active projects out of the folder. Sure i could go in and delete all objs, (some) project files, etc so it doesnt take 200mb of generated data. But i think it might be nice for only 20projects or less instead of dozen of prototypes that aren't throwaway test.

I use git for source control (but i'm sure all scm do the same thing). They dislike files are missing and if i delete them they aren't easy to browse. I like how i can commit all of my source by going to /src/main and commiting. And i can push all of them just as easily. But moving folders (to my external HD and keep history) is the problem.

Should i have every folder have its own repo? or is there some kind of workaround i can use? If every folder has its own repo is there an easy way to push all my folders to my HD (or website) for backup?

Macneil
  • 8,243

1 Answers1

4

You should not keep all your projects (not even the experiments) under the same version control repository. Yes, you should have one repository for each project.

As to the pushing, write down a small process that you follow when you work on a project, include a push in it, and make provisions for backup.

Private repositories in public GIT sites (like GitHub) are an easy way to backup to the cloud using a simple process.

I'm paranoid about version control because I had really bad things happen when I wasn't. My process for an ongoing project is:

  1. Commit frequently.
  2. Push to central repository when a feature is complete or before taking a break.
  3. Backup working directory after a session.
  4. Backup central repository.
  5. Pull in working directories under other OSs or other workstations, test, fix, and repeat the above.
  6. Push to bitbucket.
Apalala
  • 2,283