git - Revert changes to a specific file from a specific commit -


a few weeks ago (i.e. many commits ago), made git commit touched many files. of commit great.

however, i'd undo changes i'd made 1 of files, don't want override changes had been made file after commit.

is there way me revert specific commit on 1 of files in commit?

get patch-ready diff file in commit, , reverse-apply patch:

git show <commit-id> -- <path> | git apply -r - 

make sure result, , if so, add , commit appropriate message.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -