Skip to content

Instantly share code, notes, and snippets.

@antoniopresto
Last active February 9, 2024 02:08
Show Gist options
  • Save antoniopresto/a43a7aeafdab4b63ade30c73c0b96f12 to your computer and use it in GitHub Desktop.
Save antoniopresto/a43a7aeafdab4b63ade30c73c0b96f12 to your computer and use it in GitHub Desktop.
Full reset project
#!/bin/sh
git add .
COMMIT_SUCCESS=false
if git commit -m 'temp'; then
COMMIT_SUCCESS=true
fi
git clean -fdx
if [ "$COMMIT_SUCCESS" = true ]; then
git reset --soft HEAD~1
fi
pnpm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment