Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Suppose I'm setting up a website, and there are loads of images. These images won't change. But I would like that when any members of the team clone the project, they get the images so that they run the website immediately. Does this mean that I should add track the images as well? I'm just taking an example, it could be a jar in a java project or something else.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Yes, absolutely. Track any file you need. Git is more than happy to let you track non-source code files.

If you need something really big, you can also consider git annex. That versions which files are needed in git, but the files themselves are fetched separately, so their history does not take up space in everybody's repository.

share|improve this answer
1  
This is good advice, but can become very unwieldy later on, especially when those "unchanging" binary blobs start changing. But that is a problem easily put off. –  U2EF1 Mar 7 at 5:14
    
Its certainly no more unweildly than trying to maintain two separate sets of files - one in source control and one out. When the images start changing, he can then use git to get them distributed out to the team. One way or another they'll be downloading them. Obviously files like user uploads and avatars will still need to be ignored. –  GrandmasterB Mar 7 at 5:59
3  
@U2EF1: When those "unchanging" binary blobs start changing, you will be very very glad that you've put them under version control. –  Jan Hudec Mar 7 at 6:27
    
@JanHudec Early on, sure. But an image directory can easily go through hundreds of gigabytes of change when packed in git, while most people only need the most recent several. This is what I would term unwieldy. –  U2EF1 Mar 7 at 14:22
    
@U2EF1: Yes, for those cases there is git annex –  Jan Hudec Mar 7 at 14:51

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.