How to prevent `anchor build` from updating Cargo.lock automatically?

Viewed 211

I was following the tutorial with its repo. After running anchor build, I noticed a few files have been added/updated so I could not pull the repo anymore. I tried to revert any changes by deleting the target folder and removed the package.json, yarn.lock, and node_modules.

Then I found whenever I undo changes in Cargo.lock (the one at the repo root), it would add the changes back by itself as if it refuses to revert to the repo's commit version!

Why? How can I do this?

0 Answers
Related