I made some commits to git from android studio. Now I want to reset to one of the committed version. How can I do that within android studio?
At last I have found the solution.
open terminal in android studio :
You can do this by following two commands:
git reset --hard [previous Commit SHA id here]
git push origin [branch Name] -f
It will remove your previous git commit.
If you want to keep your changes you can also use:
git reset --soft [previous Commit SHA id here]
Then it will save your changes.
For more details How do you undo the last commit?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With