Clean out gitlab folder?

Hey everyone,
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?

Hello Caro,

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

Hi 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
closeFrameWhenDone=False)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 508, in syncProject
infoStream=syncFrame)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\functions.py”, line 119, in showCommitDialog
project.commit(commitMsg)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 962, in commit
self.repo.git.commit(’-m’, message)
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:
deleted: “Assoziaitonsst\303\244rke.psyexp”
deleted: Assoziationen_lastrun.py
deleted: “Assoziationsst\303\244rke.psyexp”
deleted: “OrderAssoziationsst\303\244rke.csv”
deleted: data/1_Assoziaitonen_2021_Jan_25_1624.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1624.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1624.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1628.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1628.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1628.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1630.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1630.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1630.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1631.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1631.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1631.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1632.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1632.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1632.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1633.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1633.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1633.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1634.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1634.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1634.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1639.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1639.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1639.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1645.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1645.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1645.psydat
deleted: data/1_Assoziaitonen_2021_Jan_25_1648.csv
deleted: data/1_Assoziaitonen_2021_Jan_25_1648.log
deleted: data/1_Assoziaitonen_2021_Jan_25_1648.psydat
deleted: data/1_Assoziationen_2021-01-25_16h58.10.453.csv
deleted: data/1_Assoziationen_2021-01-25_16h58.10.453.log.gz
deleted: resources/OrderAssoziationsstaerke.csv
deleted: resources/Stimuli/US2.jpg
deleted: resources/Stimuli/US3.jpg
deleted: resources/Stimuli/US4.jpg
deleted: resources/Stimuli/US5.jpg

no changes added to commit’

Hello Caro,

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

  1. 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).

  2. 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):

  1. Type ‘git add -A’ (add changes to staging area, ready to send online)|
  2. Type ‘git commit -m “(insert message here)”’ (commit the changes and add a message detailing the contents of the commit)|
  3. 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)|
  4. Type ‘git push’ (actually send the commits online)|
  5. Type ‘git log’ (check the log of commits to make sure it worked, press q to exit if necessary)|
  6. 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

Hello Jens,
I took your “safe way” advice and created a new experiment as you described. Thanks for pointing it out, now it works!