T
T
Tenebrius2017-10-03 11:01:20
git
Tenebrius, 2017-10-03 11:01:20

Whether to store images in GIT'e?

There is a "web-application", in fact - a directory. Each item in the catalog has an image. Images are not a particularly necessary detail, but they make everything look more fun and, perhaps, clearer.
There are several hundred items in the catalog, the same number of images, weighing half a megabyte each.
If the image is stored in the repository, and someone wants to clone the project for himself to edit the code, then he doesn’t need the pictures at all, and they will download for a relatively long time.
If the pictures are not stored in the git at all, then it will turn out that not all project data is in the repository, which is also not very good.
So how to be?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
IceJOKER, 2017-10-03
@IceJOKER

If the pictures are part of the project, then it’s better to store them, if it’s dynamic data, then no

E
Eugene Wolf, 2017-10-03
@Wolfnsex

So how to be?
Decide whether the pictures are part of the source code or still part of external / temporary data? If a part of the source code (for example, a logo from a website layout) is to be saved, if it is just some temporary data, give it out separately to everyone who wants it.
*Usually so, but in reality, everyone decides for himself. GIT doesn't restrict you in any way. The only thing that you should definitely not forget is that a lot of temporary (changing) data that gets into the repository has not only the "problem of downloading it", but also the property "inflate the repository in size", which in general may not be very pleasant, in some cases .

T
TyzhSysAdmin, 2017-10-03
@POS_troi

See why you asked this question.
The problem with binaries in the git is that you can’t cut them out of there and over time the turnip becomes monstrous.
If you want to store binaries in the git, then create a separate turnip and screw it with a submodule.

M
Maxim Fedorov, 2017-10-03
@Maksclub

normally, pictures are not stored in the repository if the pictures do not relate, for example, to the theme of the site (background, icons for the basket and buttons, etc...)

R
Roman Mirilaczvili, 2018-06-22
@2ord

GitLFS is specifically designed to keep large files separate from the main repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question