how to remove last few commits in git protected master branch on gitlab code example Example: git reset in gitlab git reset --hard HEAD^^