I have a branch in pull request. However, I have committed some changes that I don't want, so it will show changes like so:
package.json
yarn.lock
packages/
some-package/
a.ts
b.ts
styles/
c.css
I want to revert the entire packages/**
directory to what it was before my PR was opened
How would this be done?
CodePudding user response:
git restore --source=main ./packages
git add packages
git commit -m "Remove accidentally committed packages"
# Optionally git push