How to Display Local Repository Content?

I am new to github stuff. Currently using git bash as a CLI to communicate to remote repository I am working on. For now I do comprehend differences in between working directory and local repository the one I've just cloned to local working directory from my Github. My working directory is ~/My-Github-Project (master) within this local directory there is one local repository named as "new_repo" which I is displayed by this command: git ls-files That new_repo as a local repository-like directory has its own subdirectories (subfolders).

The question of mine would be:
What command(s) have I to follow on git bash to display new_repo subdirectories? i. e. the content of the new_repo?

Any help or reference would be appreciated.

1 Answer

Found an answer to my question accidently, steps to follow are:

  1. cd ~/My-Github-Project/new_repo # or git bash straight away from local repository
  2. git ls-files # ls-files command shows files and (or) folders if any; it also could be due to files not been added (tracked, staged) yet. To do so to be visible follow this command: git add -a, after repeat the command git ls-files # now files should be visible within.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest