failed deployment using Forge.. "your local changes will be overwritten "
Can someone help .. i am getting this error from time to time in Forge. The only solution is i remove repository and start from scratch.. the issues that it comes after few day.s.. what i am doing wrong to cause this error when I deploy and how can I solve it.
Mon Sep 19 20:29:14 GST 2016
From github.com:
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
composer.json
composer.lock
Please, commit your changes or stash them before you can merge.
Aborting
Updating 7ed39dd..e63d3cc
It looks like you are running composer update or composer require on your server. You should never do that. Always change stuff locally and commit those changes to your server.
I am having the same issue as Alzaabi98.
if I run
**composer require fzaninotto/faker ** for example
on my local homestead and commit - push the changes to the server
the server response with the same error.
I have to run the same command on the server to get the package installed.
@aurawindsurfing You shouldn't have these issues if you don't change files directly on the server. A deployment should always be done on forge by pulling the code and that's it. If you update files on your own git gets out of sync.
It can also happen that you have a log or cache file in source control which being updated after deployment or when running your application and therefore git gets out of sync.