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

techhipbettruvabetnorabahisbahis forumu