Files Not Updating Properly After Git Pull
I'm working with a Laravel application that uses Filament and several packages like filament-shield and filament-exceptions. Everything works fine in my local development environment, but when I commit the changes to GitHub and pull them on the production server, some files don’t update correctly. For instance, my PanelAdminProvider file wasn't updated as expected, even though it works fine locally.
Here are the steps I’m following:
1. I commit all my changes from the local environment to GitHub.
2. On the production server, I run git pull.
3. I execute composer install to make sure all dependencies are updated.
Despite this, some changes don’t reflect properly. I suspect it might have something to do with files in /public/vendor not being updated as well. Also, here’s my .gitignore for reference:
Is there anything I'm missing in the deployment process, especially with regard to the /public/vendor folder or file permissions? What additional steps should I take to ensure all changes are properly deployed and reflected on the production server?
Also, my local ambient is Windows but my production server is in Linux
Solution:Jump to solution
ok. got it
it was the filament cache
php artisan filament:clear-cache-components < made it work...
15 Replies
Check it was committed on github
Check you restart php-fpm if in use
check the file was changed on the server
The files that didn't changed like inside vendor isn't updated on our File Manager
So vendor shouldn't changer ever. It sounds like you are not updating composer which would change your vendor files.
How I should update the composer? I mean I used "composer install" after the git pull
As example: I've changed the "AdminPanelProvider"... After the "composer install" it should transmit the changes to the server right?
Or i need to change the file of composer.json to fix something?
Did you change the AdminPanelProvider in the /app/Providers/Filament/
Yep
and the server runs:
git fetch origin
git pull origin main
assuming you are using remote git 'origin' and branch 'main'
Yes, look
and then you are pulling it in?
What you mean?
Thats the fetch
then to merge the code you run
git pull origin main
It was the git pull rn
I tried to pull again and it said that it's already up to date
Check it's on git...
It's updated on github
The file in Github, in localhost and in my server is correct, tho it isn't working
Solution
ok. got it
it was the filament cache
php artisan filament:clear-cache-components < made it work