markonius
markonius

Reputation: 657

Git LFS - partial pull

We use Git LFS. Artists keep all of their stuff in a separate directory. As a programmer, I don't have the need for that directory.

Can I create something like a local .gitignore that would prevent that directory from being pulled?

If not, is there a one-liner or something I could alias?

Upvotes: 1

Views: 2376

Answers (2)

markonius
markonius

Reputation: 657

Git LFS has include/exclude functionality, as described in this man page, and in this thread.
All I had to do was type git config lfs.fetchexclude ".\DirectoryWithBigFiles\" into Powershell.

The better solution would probably be to split that part of the repository into a submodule, as described in Nogoseke's answer, but this was just so easy.

Upvotes: 3

Nogoseke
Nogoseke

Reputation: 984

I don't think it it possible to do a partial pull. What you might want to look into is a git-submodule.

It is basically mounting another repository inside the one you already have. With it you could just pull the part you want to work and there is no need to pull the submodule, unless you really want to update it.

Upvotes: 1

Related Questions