John Egan
John Egan

Reputation: 225

Website files in GIT - what to do with the images directory?

I'm in the process of moving my company's website from SVN to GIT. It is a large website, with a particularly large assets directory full of images, PDF files, and even a few ISO and exe files (driver downloads, things like that). While I do want all of this in source control, I'm worried that this huge resources directory (with hundreds of files and nearly 2GB in disk space) could become a problem if it is part of normal GIT activity. For example, if I create a branch or two, will I essentially duplicate this directory? Is there a way to only branch the code but ignore this assets directory?

Upvotes: 1

Views: 141

Answers (1)

Kristján
Kristján

Reputation: 18813

Git doesn't create any more copies of your files then it has to, so you don't need to worry about copying 2GB of images every time you commit or branch, though the initial clone is going to take a while. As mentioned in the comments, the best thing to do is convert your repository over and see how it turns out.

If the assets do become a problem, GitHub recently created a Large File Storage extension you can use to easily keep your images files, etc. outside the main repo. Looks like there's only an OSX build right now, but it's open source and hopefully will get some ports soon.

Upvotes: 1

Related Questions