4. Resetting unwanted changes

Conclusion and next steps

Congratulations! Now you are a master of resetting unwanted changes in Git! You've learned how to compare your working tree with the repository, how to discard local and staged changes, and how to amend the last commit to include last-minute fixes.

Up next, we'll explore tagging and branching, crucial skills for managing different versions and features within your project. But before we move on...

Quiz time!

Quiz yourself

1/7: What does the command git status do?
2/7: How do you check the differences between your working tree and the last commit?
3/7: In what scenarios would you use the git diff command?
4/7: What does the command git restore . do?
5/7: How do you unstage changes that were previously staged with git add?
6/7: What does the --amend option do when used with git commit?
7/7: What is the fastest way to run the previous command in the terminal?

Superb! Up next, we'll explore tagging and branching, crucial skills for managing different versions and features within your project.

Next step
© 2024-2025 GitByBit.All rights reserved.

Hi! I'm Alex, creator of GitByBit.

This page is a part of the interactive course about Git version control.

It's a one-of-a-kind course that is integrated into the VS Code code editor. Learning directly in VS Code lets you operate Git exactly as you would in real life, doing real jobs, writing real code.

In addition, the course has access to your actual terminal, so it can point out mistakes, suggest workarounds, etc.

The course is FREE, there are no Ads or other bullshit. There are optional premium add-ons you can purchase, mainly to support my work (regrettably, I have to eat every day), but that's totally up to you.

Learn Git in VS Code