Zed tasks

I added this task to my global ~/.config/zed/tasks.json using Zed’s zed: open tasks action. It appears in the Git Graph commit menu under Custom Commands:

{
  "label": "Undo selected local commit",
  "command": "if [ \"$(git rev-parse HEAD)\" != \"$ZED_GIT_SHA\" ]; then echo 'Refusing: selected commit is not the latest commit'; exit 1; fi; git reset --soft HEAD~1",
  "tags": ["git-command"],
  "reveal": "never",
  "hide": "on_success"
}

This is for unpushed commits. Afterward, I can unstage incorrect files, make more changes, and commit again.