I have several .psyexp files in one folder in my gitlab repository, and I want to delete the unnecessary ones. I am pretty new to all this coding, so I don’t know if those files might really cause any problems, but I feel like they do (I am having trouble updating my experiment when implementing new routines).
Is there a way to clean that folder out, i.e. to delete specific files?
you can simply click on each file. When it is opened, there is delete-button in the upper right corner of the file-window. Notice that you will upload these files again when syncing. So you might want to delete them locally. psyexp-files are not run on-line so they can’t interfere with your experiment.
Best wishes Jens
Thanks for pointing out the delete button - somehow I failed to see it before.
It is not clear to me however why the files are uploaded again even when I delete them both on Pavlovia and locally! It seems like I can’t update my experiment, no matter what I try. It is always the old version that is uploaded even when I delete it locally (so I don’t even know where it comes from).
On top, when I then try to run my experiment using the “run online” button in Builder, I get the following error message:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1242, in onPavloviaRun
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 508, in syncProject
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\functions.py”, line 119, in showCommitDialog
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 962, in commit
File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 548, in
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\git\cmd.py”, line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd(‘C:\Program Files\PsychoPy3\MinGit\cmd\git.exe’) failed due to: exit code(1)
cmdline: C:\Program Files\PsychoPy3\MinGit\cmd\git.exe commit -m _
stdout: 'On branch master
Changes not staged for commit:
no changes added to commit’
git exits with an error code, having detected changes that are, however, not staged for a commit. There basically two ways, I can think of, to continue
perhaps the safest way, is to create a new experiment. So copy your experiment folder, delete all files you don’t want to use any longer, delete the folder called .git from and the file .gitignore. Open the experiment again in PsychoPy, sync as before so that it will ask to create a new project. Use a different project name. If everything runs fine, delete the old experiment on your computer and on gitlab(Pavolovia) (tick the experiment on the Pavolvia dashboard and select delete in the top right corner).
Our you could use some git-commands. In your experiment folder, assuming that git is installed, perform all changes you want to apply to your experiment (taken from the crib sheet by Wake Carter):
- Type ‘git add -A’ (add changes to staging area, ready to send online)|
- Type ‘git commit -m “(insert message here)”’ (commit the changes and add a message detailing the contents of the commit)|
- Type ‘git pull’ (you will have to make sure that the any new files (primarily data output files), in the online repository are first added to your local repository, otherwise git will be angry)|
- Type ‘git push’ (actually send the commits online)|
- Type ‘git log’ (check the log of commits to make sure it worked, press q to exit if necessary)|
- Type ‘git status’ (double check to make sure staging area is clear and no further updates are necessary)
See here for some git-commands and a short explanation how the sync-process works.
Best wishes Jens
I took your “safe way” advice and created a new experiment as you described. Thanks for pointing it out, now it works!