Reputation: 1188
I'm using git for java projects and I did changes in many classes and I didn't do git add, git commit and push. And now I want to delete all my changes. How can I do that? Is there a git command because I don't want to delete all the code manually? Thank you!
Upvotes: 1
Views: 5192
Reputation: 112
If you want to use git command, so look at this.
Another suggestion is you can use program that make you easy to use git, like GitHub Desktop, VSCODE version control. That tools have functions that you can make it easy to manage your git project.
Upvotes: 0
Reputation: 10814
You can try
git checkout .
or
git stash
git stash drop
or (assuming you're on branch master)
git reset --hard master
Upvotes: 2