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?

1 Answer 1


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.
  • I agree. I'd also add that you don't want generated files anywhere near a "src" directory. Generated files should go in a "bin" directory.
    – Macneil
    Commented Apr 15, 2011 at 18:40
  • Do you have any suggestions for pushing all repos when i attach a drive? I am thinking of writing a script that will look at every folder and do a push. @Macneil: Unfortunately when using asp.net you cant avoid it. git easily ignores generate files tho. I ignore /Debug /Release which handles 90% of objs then /resource and a few *.ext for generated files (either profiling or intellisense) and its handled.
    – user2528
    Commented Apr 15, 2011 at 19:20
  • @acidzombie24: This sounds more like a backup management plan than a version controlling plan. A better fit for you might be Dropbox.
    – Macneil
    Commented Apr 15, 2011 at 22:27
  • @Macneil: What! are you crazy.... It's insane to think dropbox is a suitable SCM.
    – user2528
    Commented Apr 15, 2011 at 22:46
  • @acidzombie24 Attaching a drive is about backups. A script is OK, but the least often talked secret about backups is that they must be tested by a restore, or deemed useless.
    – Apalala
    Commented Apr 15, 2011 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.