Reverting just a couple files from a while ago
2 weeks agoThere were 3 files in my repo that had been inadvertently changed like 20 commits ago. I just wanted to revert 3 of them, not all the files in the commit. This was easiest way to do it.
git show <commit-hash> -- path/to/file1.php path/to/file2.js path/to/file3.html | git apply -R
I always forget this and relearn it every 2 years, so maybe next time around I'll look here.