Selectively revert or checkout changes to a file in Git? January 18, 2023 by Tarik With git version >= 1.7.1 I can git checkout -p I am not sure when this feature was introduced.