Using git reset --hard HEAD^, as suggested by @konrado0905