Directories within the storage and the bootstrap/cachedirectories should be writable by your web server or Laravel will not run and throw permission error. Sometimes this also creates 500 internal error. Try this php artisan cache:clear sudo chmod -R 777 storage sudo chmod -R 777 bootstrap/cache...
NOTE : First commit your current changes, or you will lose them.
Then run these commands:
git rm -r --cached .
git add .
git commit -m "fixed untracked files"