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.

For those who don't know, Git is the most popular distributed version control system today.

I have 2 Seagate FreeAgent hard drives.

Is it possible in theory to sync both hard drives by using one of them as "main" hard drive and another one as "remote"?

Sorry I don't have much experience with Git besides some basic stuff with GitHub.

share|improve this question
1  
Most popular by what measure? Who did that survey? –  Flimzy Jul 6 '11 at 6:29
3  
Is there a reason you want to use git for this, rather than a tool that's designed for syncing hard drives? –  Flimzy Jul 6 '11 at 6:30
    
git is a version control system for text files, not a syncing tool for arbitrary files –  Sathya Jul 6 '11 at 6:34
    
@Flimzy, +1. IMHO, Git is the latest version control technology. However, it is not most popular as of now. In future, it may! –  matrix Jul 6 '11 at 8:26
    
The operating system wasn't mentioned here - if it happens to be Windows, ROBOCOPY is good for the job: en.wikipedia.org/wiki/Robocopy –  Ruairi Fullam Jul 6 '11 at 9:13

3 Answers 3

up vote 4 down vote accepted

git will handle binary files (albeit less efficiently than text files) so, in theory, yes, you could do this.

But you really don't want to.

git keeps a complete history of all files in each copy of the repository. It's compressed, so it will likely be significantly smaller than the set of active files (unless you have a long and change-filled history), but this history will still eat a substantial chunk of each drive. Unless you specifically want to be able to do things like set up multiple branches or roll back changes on either drive, that's going to be a lot of space wasted for no reason.

Personally, I'd use rsync for this sort of thing, assuming that all copying will be uni-directional (i.e., "make this drive look exactly like that drive"). I know there are other tools out there which are a little more sophisticated and will handle bi-directional synchronization (changes have been made on both drives since the last sync, so combine the change sets), but I've never had a need for that capability, so I have no recommendations.

share|improve this answer

It is NOT the answer to your question. But If your requirement is to sync two hard drives than you can use taucan utility to do the job. It is free, portable and efficient. You can sync the entire HDD or choose selected folders. There are many other options as well. I am using this app for last one year without any issue.

share|improve this answer

Do you plan to do it automatically, as a kind of backup means? If so, take extra care to make sure "primary" disk is working properly before synchronizing. If it gets damaged and you still try to sync from it, some stinky object'll hit the fan.

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.