How can I check out a particular version of one file in Git?

You know what commit (ie: the specific revision) the file belongs to? Then do:

git checkout <commit> <file>

The other command:

git checkout HEAD~N <file>

Is for when you want to get a version of the file from a range back (which I do for nostalgia).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)