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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like