How to revert multiple files (but not all) to a past commit?
Asked Answered
D

1

8

I need to revert a bunch of files (about 40-50) to a specific commit. However, I don't want to revert all the files. How do I do that without doing a per-file checkout for each of the files I need to revert? All the files I need to revert are located under a single folder.

Discommend answered 13/10, 2014 at 7:54 Comment(0)
D
15

I already found out the solution.

git checkout master~1 ./FolderIWantToRevert ./AnotherFolderToRevert

Do note that I wanted to revert to the previous commit, that's why there's the ~1 after master.

Discommend answered 13/10, 2014 at 8:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.