Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jgravois's avatar

Deploy Error -- Help -- Production is down

OMG, getting this and I don't know what to do

Thu Apr 1 20:24:48 UTC 2021
Saved working directory and index state WIP on master: df5bb8a Merge pull request #238 from UAM-DEV/staging
From github.com:UAM-DEV/eight
 * branch            master     -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
    public/avatars
Please move or remove them before you merge.
Aborting
Updating df5bb8a..19415d2
0 likes
7 replies
automica's avatar
automica
Best Answer
Level 54

You’ve got files on your server which aren’t in your repo.

I would copy those files in public:/avatars somewhere safe and then you should be able to do a git reset HEAD —hard to bring your server up to the latest version in your branch.

You’ll then want you to manage the missing files in your avatars directory. Personally I would back up that directory, remove the folder from your repo and then add the public/avatars directory to your .gitignore to exclude it from your repo.

Then you’ll want to restore that directory from your backup.

jgravois's avatar

This is my gitignore

/node_modules
/public/hot
/public/storage
!/storage/app/public/avatars/*
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log

Shouldn't files I put locally in /storage/app/public/avatars go to the repo????

jgravois's avatar

My image files are on my forge server ... but the symlink is pointing to my local computer and everything is broken

lrwxrwxrwx  1 forge forge     55 Apr  1 20:48 avatars -> /Users/jongravois/code/eight/storage/app/public/avatars

Should be linked here

/home/forge/www.my-uam.com/storage/app/public/avatars
automica's avatar

Have you tried running php artisan storage:link on your server ?

jgravois's avatar

It gave me errors about unresolved directories so I removed each symlink manually on the server and then ran php artisan storage:link and it worked.

I'm all good ... THANKS!!!

1 like

Please or to participate in this conversation.