0
0
Gitdevops~20 mins

Git LFS for large files - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Git LFS Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Git LFS track command effect
What is the output or effect after running git lfs track "*.psd" in a Git repository?
Git
git lfs track "*.psd"
ARemoves all .psd files from the repository history
BDisables Git LFS tracking for .psd files
CImmediately uploads all existing .psd files to the remote Git LFS server
DAdds an entry to .gitattributes file to track all .psd files with Git LFS
Attempts:
2 left
💡 Hint
Think about what the track command does to file patterns in Git LFS.
Troubleshoot
intermediate
1:30remaining
Git LFS push error diagnosis
You run git push origin main after adding large files tracked by Git LFS, but get an error: batch request: This repository is over its data quota. What is the most likely cause?
AYou have exceeded the storage or bandwidth limits of your Git LFS hosting service
BThe remote repository URL is incorrect
CYou forgot to run <code>git lfs install</code> before pushing
DYour Git LFS client is outdated and cannot push files
Attempts:
2 left
💡 Hint
Consider what 'over its data quota' means in hosting services.
Configuration
advanced
2:00remaining
Configuring Git LFS for a new repository
Which sequence of commands correctly sets up Git LFS tracking for all .zip files and commits the configuration?
A
git lfs install
git lfs track "*.zip"
git add .gitattributes
git commit -m "Track zip files with Git LFS"
B
git lfs track "*.zip"
git add .gitattributes
git commit -m "Track zip files with Git LFS"
git lfs install
C
git add .gitattributes
git lfs install
git lfs track "*.zip"
git commit -m "Track zip files with Git LFS"
D
git lfs install
git add .gitattributes
git lfs track "*.zip"
git commit -m "Track zip files with Git LFS"
Attempts:
2 left
💡 Hint
Remember the order: install Git LFS first, then track, then add and commit.
Best Practice
advanced
1:30remaining
Best practice for storing large files in Git
Which practice is best when working with large binary files in a Git repository?
ACommit large binary files directly to the Git repository without Git LFS
BUse Git LFS to store large binary files outside the main Git history
CCompress large files manually and commit the compressed versions without Git LFS
DStore large files in a separate branch within the same repository
Attempts:
2 left
💡 Hint
Think about how Git handles large files and history size.
🔀 Workflow
expert
2:00remaining
Git LFS file retrieval after clone
After cloning a repository that uses Git LFS, what happens when you run git checkout main?
AGit LFS disables itself and large files remain as pointers in the working directory
BGit checkout fails because large files are missing and must be downloaded manually
CGit LFS downloads the actual large files referenced by pointers automatically during checkout
DGit replaces large files with empty placeholders and requires manual download commands
Attempts:
2 left
💡 Hint
Consider how Git LFS integrates with Git commands after cloning.