git checkout

Updated: 20 June 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(s), as it was at a particular commit

git checkout commit-hash -- my/file another/file2

Leave a comment