Laravel Forge manages auto-deploys of a Laravel app, on every push to the repository.
I've never had a problem, until we switched servers on DigitalOcean.
Following this I had to create a new server on Forge and link it to the previous server's repository.
The local code has remained the same, as has the remote code.
I just changed the server to Forge, and liked it to Bitbucket (as usual).
I have started to receive error like this:
on Feb 19 14:21:47 UTC 2023
From bitbucket.org:XXX/XXX-app
* branch master -> FETCH_HEAD
35e743e..aa18902 master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
xxx.php
Please commit your changes or stash them before you merge.
Aborting
Updating 3856d4a..aa18902
or this:
Sun Feb 19 14:21:47 UTC 2023
From bitbucket.org:XXX/XXX-app * branch master -> FETCH_HEAD
error: cannot lock ref 'refs/remotes/origin/master': is at aa18902c3d1b2288a290f6c089be12e457205b77 but expected 35e743e53101820a74e4d903e12f14c481adc2d1
! 35e743e..aa18902 master -> origin/master (unable to update local ref)
I have try to reset my local git with:
git reset --hard
git clean -df
as suggested on Forge and inside various web blogs & articles without solutions.
Is there a way to align my local version, what is present on Bitbucket and the Forge server (on DIgitalOcean) ?
Many thanks for your help, very appreciated.