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~1git reset --hard HEAD~1Update file permissions on file(s), here add execution permissions on all sh files in the current directory
git update-index --chmod=+x *.shTo 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>git branch -B <BRANCH> origin/<BRANCH>git reset --hard origin/<BRANCH>