{"id":858,"date":"2015-10-19T08:10:37","date_gmt":"2015-10-19T07:10:37","guid":{"rendered":"http:\/\/trigonakis.com\/blog\/?p=858"},"modified":"2015-10-19T08:10:37","modified_gmt":"2015-10-19T07:10:37","slug":"git-how-to-revert-a-file-to-a-specific-commit","status":"publish","type":"post","link":"http:\/\/trigonakis.com\/blog\/2015\/10\/19\/git-how-to-revert-a-file-to-a-specific-commit\/","title":{"rendered":"git: How to revert a file to a specific commit"},"content":{"rendered":"<div class=\"seriesmeta\">This entry is part 7 of 7 in the series <a href=\"http:\/\/trigonakis.com\/blog\/series\/git-howtos\/\" class=\"series-207\" title=\"git: useful HOWTOs\">git: useful HOWTOs<\/a><\/div><pre lang=\"bash\">\r\ngit checkout COMMIT_HASH file\/to\/revert\r\n<\/pre>\n<p>Will bring the <code>file\/to\/revert<\/code> file to the state in <code>COMMIT_HASH<\/code> commit.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"seriesmeta\">This entry is part 7 of 7 in the series <a href=\"http:\/\/trigonakis.com\/blog\/series\/git-howtos\/\" class=\"series-207\" title=\"git: useful HOWTOs\">git: useful HOWTOs<\/a><\/div><p>git checkout COMMIT_HASH file\/to\/revert Will bring the file\/to\/revert file to the state in COMMIT_HASH commit.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[37],"tags":[10,208],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1ouW6-dQ","_links":{"self":[{"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/posts\/858"}],"collection":[{"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/comments?post=858"}],"version-history":[{"count":1,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/posts\/858\/revisions"}],"predecessor-version":[{"id":859,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/posts\/858\/revisions\/859"}],"wp:attachment":[{"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/media?parent=858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/categories?post=858"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/trigonakis.com\/blog\/wp-json\/wp\/v2\/tags?post=858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}