Stop using GIT for synchronizing files!

Well, this quick blog post is a sort of a quick rant.

That’s the second time I see someone trying to use GIT for binary files synchronization. That’s true, it’s quite easy to create a local GIT repository, then adding a remote is a piece of cake and “TADA” local commits could be pushed to the remote than from there cloned / pulled into another machine. But! Because there’s a really big “BUT”!

Remember for what GIT was designed. That’s right, source file handling, with history and merging. What are source files? They are text files, yes. That’s not binary. GIT can actually compare successive version and only handle diffs (patches). Have you tried using the patch tool with binary files? That makes you laugh, isn’t it! So why using GIT for file sync won’t you also make you laugh? Should I continue now? 😉 Well, I should continue, because GIT also has history. So you’ll force it to store every binary version you ever had, into it’s little .git directory. Is that what you really want?

If file synchronization is needed, then consider rsync, unison or equivalent tools, pretty please.

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply

Your email address will not be published. Required fields are marked *