i want to undo my local commit
This one’s easy:
git reset HEAD^
This will rewind the git history to before your commit, so any files changed will be back in the unstaged state.
From there you can make any changes you like, and recommit with the changes you want.