- Changed shebang to use env for better portability. - Added error handling to ensure the script exits on failure. - Included a check to confirm the current branch is 'main' before proceeding. - Updated git commands to fetch and reset to origin/main, ensuring a clean state. - Enhanced user feedback messages for clarity.