I am a newbie in Git and it is seems a bit challenging. I have made changes in a local directory of my repository. These changes are the deletion of a file and the modification of several. How can I go back to the initial state before this changes happen?(This is the state when the repository was cloned)
Asked
Active
Viewed 595 times
2 Answers
2
You can simply use...
git checkout .
...which will throw away all dirty changes.

alex
- 479,566
- 201
- 878
- 984
2
You can clear all local changes by doing this.
git reset --hard
https://www.kernel.org/pub/software/scm/git/docs/git-reset.html
Note that it is case-sensitive.

TheBuzzSaw
- 8,648
- 5
- 39
- 58