Error 500 when trying to sync experiment from Builder to Pavlovia

Computer : 2023 MacBook Air, Apple M2 Pro Chip, 32 GB RAM
OS : macOS Ventura, version 13.4.1
PsychoPy version (e.g. 1.84.x): 2022.2.5, running same version

What’s wrong? I’ve been trying to sync my experiment from Builder to Pavlovia, but as soon as I try syncing more than the most basic experiment (e.g. a single routine with a text component and a key component), I get the error message pasted below.

What did you try to make it work?: I’ve tried deleting the .git files in the project folder, syncing other experiments that I know have worked in the past on Pavlovia, and adding in new components to a basic experiment one-by-one, attempting to sync each time. I haven’t been able to isolate what’s causing the issue.

What specifically went wrong when you tried that?:

Traceback (most recent call last):

File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1374, in onPavloviaSync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/project.py”, line 801, in syncProject
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/sync.py”, line 47, in sync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 839, in sync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1026, in firstPush
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 542, in <lambda>
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 1005, in _call_process
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 822, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
  cmdline: /Applications/PsychoPy.app/Contents/Resources/git-core/git push -u

https://oauth2:e7573270c49ad8a034b91fe159225078a71fe84a6be2889a6e0b0b3baca04261@gitlab.pavlovia.org/learningdevlab/relationaldelay_09

master
  stderr: ‘warning: redirecting to https://gitlab.pavlovia.org/learningdevlab/relationaldelay_09.git/
error: RPC failed; HTTP 500 curl 56 The requested URL returned error: 500
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date’

Update: This thread (HTTP 500 error on initial git push) has been immensely helpful, and once I figured out that I just had to drag the hidden .git file into terminal (after "cd " of course) to make it my working directory, the commands listed in this solution work out great. (Yeah, not the most terminal/tech-savvy here, so it took a minute to figure out.)