Updated: 22 February 2024
Checkout a single file from a specific commit
git checkout <COMMIT> path/to/the/file
Checkout one file from another branch
git checkout grab-from-this-branch -- logout.js
Checkout file, as it was, at a particular commit
git checkout commit-hash -- my/file another/file2