git - Listing file names from an old commit -
i have deleted several files repository long time ago. years later want @ them. if know names of 1 of files, can @ history 1 of them using:
git log -- path/to/file
if want see version of file old commit, use this:
git show commit:path/to/file
but of assumes know path/to/file, don't. there way list files existed @ time, given commit?
i realize can repeatedly until find it:
git checkout -- commit
but complete file list old commit ideal. such capability exist? given comprehensiveness of git, i'll bet there is, surely don't know it.
you can find commits deleted files like:
git log --diff-filter=d --name-only --oneline
--diff-filter=d
selects files deleted--name-only
shows filenames--oneline
uses one-line commit description
Comments
Post a Comment