This workshop is on Git LFS (Large File Storage), which versions data, images, fonts, PDFs, etc. efficiently in Git. It's best for large non-text files.
This assumes you're familiar with Git.
These commands set up a repository to track JPG and PNG files with Git LFS:
# Set up Git LFS. You only need to run this once per user account
git lfs install
# Use Git LFS to manage all .jpg and .png files
git lfs track "*.jpg" "*.png"
# Use Git LFS to manage all files under `assets/`
git lfs track "assets/**"
# Track .gitattributes for others who clone the repo to use Git LFS
git add .gitattributes
git commit -m"Add Git LFS for images"
git push
- Fork this repo into your namespace. Use
git
to clone your fork - Run
git lfs install
to set up Git LFS for your account - Save this image as
img/small.jpg
(use this EXACT path) - Save this PDF file as
docs/9711213.pdf
(use this EXACT path) - Unzip the Joan font font under
fonts/
(use this EXACT path) - Track all
*.jpg
,*.png
and*.pdf
files with Git LFS - Track all files under
fonts/
with Git LFS - Add all files (including
.gitattributes
) usinggit add .
- List all tracked files by typing
git lfs ls-files > lfs-files.txt
. This saves the list of LFS files aslfs-files.txt
in the root of your repository (use this EXACT path) - Add
lfs-files.txt
, commit and push the code to your fork - Create an issue titled
Exercise submission
. Add a link to your repo and submit the issue.