Cannot push my psychopy/js experiments to pavlovia (git failed)

I can run the experiment on my local machine, but I cannot push it to the pavlovia server. I can git commit and push from my terminal, but it doesn’t run on the pavlovia there.

When I tried to sync from the pavlovia GUI. It gave the following error:

Traceback (most recent call last):
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/ribbon.py”, line 1018, in onPavloviaCreate
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 1612, in onPavloviaSync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 906, in sync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1030, in repo
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1107, in newRepo
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1315, in commit
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 986, in <lambda>
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1598, in _call_process
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1388, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(1)
  cmdline: git commit -m Create repository (including .gitignore)
  stdout: ‘On branch master

Initial commit

Untracked files:
  (use “git add <file>…” to include in what will be committed)
	cluster_validation-legacy-browsers.js
	cluster_validation.js
	cluster_validation.psyexp
	index.html
	master_list.csv
	participant_lists/
	participant_stimuli.csv
	readme.md

nothing added to commit but untracked files present (use “git add” to track)’

I have checked the contents in .gitignore:


# Byte-compiled / optimized / DLL files
__pycache__/
*.pyc
*.pyo
*.pyd
*.so

# Backup files
*.bak
~$*.xls*
~$*.doc*
~$*.ppt*

# Jupyter Notebook
.ipynb_checkpoints

# Virtual Environment files
.env
.venv
env/
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# OS generated files
.DS_Store
.directory
.gdb_history
ehthumbs.db
Icon?
*.orig
old
Thumbs.db
.Spotlight-V100
.Trashes

# lib files used for local debugging
/lib/
/html/lib/

If I run git status in the directory:

On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	cluster_validation-legacy-browsers.js
	cluster_validation.js
	cluster_validation.psyexp
	index.html
	master_list.csv
	participant_lists/
	participant_stimuli.csv
	readme.md

nothing added to commit but untracked files present (use "git add" to track)

It seems nothing has been staged (git add) into git.

OS (e.g. Win10): Mac
PsychoPy version (e.g. 2024.2.4 Py 3.10):
Standard Standalone Installation? (y/n) If not then what?: yes

I have seen this relevant posts, but nobody answered.

This might help:

Thank you! I have provided more information based on it!

Hi everyone. I think I have the found the cause. I accidentally add .gitignore in my global gitignore file. After I delete this line in the global gitignore. Pavlovia can sync.

1 Like

Where is the global gitiignore file? Do you have any idea how/why this happened?

I put global gitignore in ~/.gitignore as defined by git config --global core.excludesfile Honestly I cannot remember why I put .gitignore in my global gitignore. It must be some mistakes unrelated to psychopy. This leads to psychopy not being able to use its own gitignore file in the experiment root directory.

1 Like