You can also specify a commit hash
(often also called commit ID
) with the git show
command.
git show <commitHash>:/path/to/file
git log /path/to/file
commit hash
such as commit 06c98...
(06c98... being the commit hash)commit hash
git show <commitHash>:/path/to/file
using the commit hash
of step 3 & the path/to/file
of step 1.Note: adding the ./
when specifying a relative path seems important, i.e. git show b2f8be577166577c59b55e11cfff1404baf63a84:./flight-simulation/src/main/components/nav-horiz.html
.