How do git display a list of the files that are recorded in the repository?

422    Asked by DianaCampbell in Data Science , Asked on Jul 31, 2023

 By deploying the command-line git, how to make git display files that are recorded in the repository?

Answered by Elayne Balding

 In case you want to list the files, git display tracked files being tracked under the master branch by the below-mentioned code:

      Git Is-tree -r maser – name - only

The command will list the files currently tracked.

The following command can be used ti list files that were present previously
Git log – pretty=format: –name-only –diff-filter=A| sort-| sed ‘/$/d’ The command lists the erased files also.
You can use the command below to display the tracked files that are committed on the present branch.
Git Is-tree ==full-tree –name-only -r HEAD

Here full-tree allows the command to run as if you are in the root directory of the repository.

-r breaks into subdirectories. When mixed with –full tree, it offers the committed files.
HEAD denotes the branch you wish the list of tracked files for.

The Data Science Certification Training offered at JanBask Training provides courses similar to offline sessions, helping students attain a broad idea on the basic and advanced concepts related to Data Science. The students also get to know the ways to manage structured and unstructured data applying the intelligence to figure out substantial conclusions. JanBask Training makes you industry-ready to face the job market scenario, examining the provided data and creating proper insights from them.



Your Answer

Interviews

Parent Categories