1

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
markonius
  • 625
  • 6
  • 25
  • Possible duplicate of [How to git-pull all but one folder](https://stackoverflow.com/questions/2416815/how-to-git-pull-all-but-one-folder) – Nogoseke Dec 20 '17 at 09:56
  • Do you mean that you want to ignore some files which are managed by git-lfs? – max630 Dec 20 '17 at 10:49
  • 1
    Possible duplicate of [Is it possible for git pull to ignore some files / folders?](https://stackoverflow.com/questions/36376136/is-it-possible-for-git-pull-to-ignore-some-files-folders) -- it is poorly named but is about git-lfs – max630 Dec 20 '17 at 10:53
  • Yes, thank you. These existing questions seem to related to what I need. I will update this thread with an answer once I see which one actually solves my problem. – markonius Dec 20 '17 at 12:19

2 Answers2

3

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.

markonius
  • 625
  • 6
  • 25
1

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.

Nogoseke
  • 969
  • 1
  • 12
  • 24