Use .gitignore for large files? #32263
-
I am working with large .tif files (rasters) that need to be in the R project folder for the code to work, but they seem to prevent the repo from being able to push because of the file size (some over 2gb). These large files do not really need to be saved to the repo because they are freely available to download if ever lost, but I need to keep them in the folder. I am looking for a work around so that I can keep all the files I want in the local folder associated with my repo, but have some be overlooked when adding/committing/pushing so that they don't slow down the process as much. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @zlkvet What you're trying to achieve is certainly possible, however, I wouldn't be able to tell you how to do it precisely without knowing your current folder/file structure and names. Instead you can take a look at this and/or this guide about how the gitignore file works. As a short example if the file name is |
Beta Was this translation helpful? Give feedback.
-
You have two options:
|
Beta Was this translation helpful? Give feedback.
-
Try this https://github.com/EmptyDeck/Large-File-Ignorer-for-Github |
Beta Was this translation helpful? Give feedback.
Hi @zlkvet
What you're trying to achieve is certainly possible, however, I wouldn't be able to tell you how to do it precisely without knowing your current folder/file structure and names. Instead you can take a look at this and/or this guide about how the gitignore file works.
As a short example if the file name is
foo.tif
and the folder name the file is in is calledbar
you can putbar/foo.tif
in your gitignore file and that should ignore the file but not the folder. In case you wanted to ignore all the files ending in.tif
in thebar
folder you could addbar/*.tif
in your gitignore. However, in case you already have the file committed to the repository you might need to delete it from …