My situation: On my branch origin webshop
I need to delete the 2 above commits and revert the whole project back to the 3rd commit.
i Tried:
git reset --hard 69697a5
But this keeps the other 2 commits..
My situation: On my branch origin webshop
I need to delete the 2 above commits and revert the whole project back to the 3rd commit.
i Tried:
git reset --hard 69697a5
But this keeps the other 2 commits..
I wouldn't recommend deleting commits that are already pushed to a remote. This can lead to much confusion for other contributors. Therefore I'd recommend you to revert the commits locally and then push your results: git-revert Documentation.
If you need to truly delete the commits you should first do git reset --hard COMMIT
has you have already done. To delete the commits on the remote you need to rewrite it's history aswell using git push --force
. You can find further documentation here.