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

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

c# - Why won't my code write to SQL? -

c# - Avoiding duplicate methods for Task and Task<T> -