Git Ls-files
Predict Output Medium
Question
What does this code print?
Code
git ls-files
# file1.txt
# file2.txt
Hint
ls-files shows files Git is tracking.
Explanation
git ls-files lists all files that Git is tracking in the repository. This includes files from all branches that have been checked out. Untracked files are not shown. Use git status to see untracked files.
Related Resources
Related Lessons
- Git Status
Learn git status.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.