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 565 times
2 Answers
2
You can simply use...
git checkout .
...which will throw away all dirty changes.
alex
- 460,746
- 196
- 858
- 974
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,390
- 4
- 36
- 56