Example:
$ cd lib $ git absolute-path test.c # how to do this? lib/test.c
While browsing your Git repository, start typing in the path control box to search for the file or folder you are looking for. The interface lists the results starting from your current folder followed by matching items from across the repo.
As of at least git 1.6.0, use ls-files
:
$ cd lib $ git ls-files --full-name test.c lib/test.c
For older git, use git ls-tree
:
$ cd lib $ git ls-tree --full-name --name-only HEAD test.c lib/test.c
This only works for files that have been committed into the repo, but it's better than nothing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With