About this question
Using command-line git, how can I make git show a list of the files that are being tracked in the repository?
Using command-line git, how can I make git show a list of the files that are being tracked in the repository?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Data Science Expert
Answered on Jul 12, 2021
To list all the files currently git show tracked files being tracked under the branch master using:
git ls-tree -r master --name-onlyThis command will list the files that are being tracked currently.
If you want a list of files that ever existed use:
git log --pretty=format: --name-only --diff-filter=A | sort - | sed '/^$/d'This command will list all the files including deleted files.
Geraldinebond Latest answer
Answered on Apr 24, 2025
To display a list of files that are being tracked in a Git repository, you can use the following command:
git ls-filesThis command will list all the files Geometry Vibes Unblocked that Git is tracking in the current repository.
Ranjana Admin JanBask Expert
Answered on May 22, 2024
To list the files that are currently being tracked by Git in your repository, you can use the following commands:Basic Command
git ls-files: This command lists all the files that are being tracked by Git, including files in the staging area and the working directory.
git ls-filesDetailed Options
The git ls-files command has several options that you can use to customize the output:
Show modified files only:
git ls-files -m
his lists only the files that have been modified.
Show deleted files only:
git ls-files -dThis lists only the files that have been deleted but are still tracked by Git.
Show others (untracked files):
git ls-files --others
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Data Science guides from industry experts
Common Data Science interview questions, answered
Guides, tips and career advice on Data Science from JanBask experts.
Data Science The Best Data Science Projects (Beginner To Advanced)
Discover 15 data science project ideas from beginner to advanced levels. Includes tech stacks, time estimates, & real-use cases.…
Data Science Data Science vs Software Engineering - What you should know?
Compare Data Science vs. Software Engineering - explore skills, tools, roles, salaries, and career scope. Discover which tech…
Data Science Top 15 Deep Learning Algorithms You Must Know in 2025
Discover the top 15 deep learning algorithms powering AI in 2025. Learn how deep learning models, DL models, and deep machine…
Data Science Deep Learning Tutorial Guide for Beginners
Deep Learning, Machine Learning & Artificial Intelligence have become trending words of the IT sector today.