Undo last n commits. After running the command, you'll find the changes as uncommitted local modifications in your working copy.
git reset --soft HEAD~1
$ git reset --hard HEAD~1
Update file permissions on file(s), here add execution permissions on all sh files in the current directory
git update-index --chmod=+x *.sh
To find the merge commit to revert
git log
- -m 1 is the first parent, i.e. the commit where merge was merged into
- -n doesn't commit automatically
git revert -m 1 -n <merge-commit>