Monday, July 4, 2016

[Git] Checkout certain version of a file

 GIT   GitHub  

Checkout certain version of a file


View commit history


git log -p [FilePath-and-name]

PS. If you want to skip the diff message, skip –p

git log [FilePath-and-name]








Copy the commit hash.


Checkout


git checkout [Commit-hash] [FilePath-and-name]




No comments:

Post a Comment