Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a number of git repositories which I would like to keep synchronized and backed up. By synchronized, I mean that I work off of several different computers and want to always use the latest copy. By backup, I would like to have something that I can restore from quickly (less than 5 minutes).

The options I see are:

  1. consolidate to a single repository

    not a problem now, but perhaps down the road when I want to only share a subset of code just run git push/pull once

  2. write a script to recurse into sub-directories and run git push/pull

    a bunch of git sub-modules is a pain to manage, is there any other way to do this without having to recurse through all the sub-modules.

share|improve this question
    
Your operating system is... ? (or does it even matter?) –  slhck Jul 21 '11 at 12:29

1 Answer 1

If those repos aren't too big, another solution would be to recurse into sub-directories and run git bundle --all:

You ends up with one file per repo, much easier to save/transfert.

From each bundle, you can easily pull/clone in order to restore a working Git repo.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.