Today I Learned you can discard changes in all files in a Git repo with this command:

git restore .
Bash

I use this a lot when testing different PRs and need to discard file changes after running the build command for each one.

๐Ÿค– Clarification on the use of Artificial Intelligence in this content

  • ๐Ÿ“ AI used for: text correction;
  • ๐Ÿง  Model: ChatGPT 4.1;
  • ๐Ÿง Human Reviewed: Yes.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *