I commit changes to git from Android Studio, after that I have made some changes in my project that gives me errors, and now I want to get back that commited version that ha
Just get your commit id using git log. Then you can use (with 0d1d7fc32 for example):
# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
or if you don't want to save your changes (hard reset):
# This will destroy any local modifications.
# Don't do it if you have uncommitted work you want to keep.
git reset --hard 0d1d7fc32
If you want to go back to the last commit (without saving changes), then no need to get the id, go for:
git reset --hard HEAD
From this post