How I can undo changes made in a specific folder?
I've modified files from multiple folders like
app/code/core/ app/code/local/ app/design/frontend/
I want to undo all the changes made in files present in app/code/core/
, while keeping the changes modified in files present in app/code/local/
and app/design/frontend/
.
Try Git checkout --<file> to discard uncommitted changes to a file. Git reset --hard is for when you want to discard all uncommitted changes. Use Git reset --hard <commit id> to point the repo to a previous commit.
To revert changes made to your working copy, do this: git checkout . Or equivalently, for git version >= 2.23: git restore .
If you want to undo the changes, do git checkout app/code/core/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With