- Forums
- laravel
- Commands To Hestia Server When A New Github Repo Is Updated To Push Pull Fetch
use these commands to help you when you have made changes to a github repo for the remote server. [5317], Last Updated: Mon Jun 24, 2024
edw
Sat Apr 27, 2024
0 Comments
218 Visits
These are helpful commands to use for the Hestia server where you may have a Laravel API working with a React SPA and you need to push and pull the new changes to the laravel application in the remote server using ssh:
PUSH from LOCAL
To push from local dev:
git add .
git commit -m "202404271821pm. Fixed the issues with the time differences in server and posts"
git push production main
TO PULL/FETCH FROM REMOTE SERVER
#REMOTE SERVER PULL:
TRY THIS BEFORE YOU REBUILD: THIS WORKS
https://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files
cd ~/web/[SITE].com/private/laravel/[APPNAME]
git add *
git commit -m "202404271821pm. example commit"
git fetch production main
git merge -s recursive -X theirs production/main
php artisan config:cache
php artisan config:clear
php artisan cache:clear
php artisan route:cache