Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List files in local git repo?

Tags:

git

I'm using Sparkleshare, which uses Git to sync files between my laptop and my backup server.

Now I want to be able to browse in the files and dirs that I've uploaded to my server, but I do not know how?

I understand that Git uses some sort of special file hierarchy and that I cannot just list my files, right?

But how would I have to do to list them and browse my files?

like image 974
Daniel Holm Avatar asked Dec 16 '11 10:12

Daniel Holm


People also ask

How do I see files in a git repository?

The Git Show command allows us to view files as they existed in a previous state. The version can be a commit ID, tag, or even a branch name. The file must be the path to a file. For example, the following would output a contents of a file named internal/example/module.go file from a tagged commit called “release-23”.


1 Answers

This command:

git ls-tree --full-tree -r --name-only HEAD 

lists all of the already committed files being tracked by your git repo.

like image 56
karlphillip Avatar answered Oct 16 '22 11:10

karlphillip