Git revert just some files in commit [duplicate]

You can use git checkout:

git checkout HEAD~ -- file/to/revert

to stage a version of the file from the previous commit. Then just commit the changes and you’re good to go! Of course, you can replace HEAD~, which references the previous commit, with a hash of a commit, a further-back ancestor, or any “tree-ish” object you wish.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)