Skip to content

gramener/git-lfs-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Git LFS

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.

See video tutorial

Git LFS quick start

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

Setup

  1. Install Git
  2. Install Git LFS

Exercise

  1. Fork this repo into your namespace. Use git to clone your fork
  2. Run git lfs install to set up Git LFS for your account
  3. Save this image as img/small.jpg (use this EXACT path)
  4. Save this PDF file as docs/9711213.pdf (use this EXACT path)
  5. Unzip the Joan font font under fonts/ (use this EXACT path)
  6. Track all *.jpg, *.png and *.pdf files with Git LFS
  7. Track all files under fonts/ with Git LFS
  8. Add all files (including .gitattributes) using git add .
  9. List all tracked files by typing git lfs ls-files > lfs-files.txt. This saves the list of LFS files as lfs-files.txt in the root of your repository (use this EXACT path)
  10. Add lfs-files.txt, commit and push the code to your fork
  11. Create an issue titled Exercise submission. Add a link to your repo and submit the issue.

Videos

Git LFS Workshop Video

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published