Edit: the problem was solved by deleting the repository and importing it again.
Unfortunately, a commit was made immidiately to the master in our project. The code that was committed contained old and broken code. I tried to revert this commit. To achieve this, I did the “Reset current branch to this commit” action in Sourcetree. I selected “Hard mode”, after reading something about this on stackoverflow, but I ended up with the broken part of the code, the part I wanted to revert, to be in all my local branches. I did not push this, so the remote branches are still intact, but also when I pull from the remote branches, nothing changes in my local branches and the broken code remains there.
I hope there might be a solution to this. Otherwise, I will try to fully reinstall Sourcetree.
Thanks in advance, and if there is still information missing, I would be glad to provide it to you.