How I got this error:
I had to take a pull in my project directory
I tried to take the pull by running the below commandscd <My Project Directory>
sudo git pull
The outcome of the above command was:
root@ip-172-31-20-213:/opt/lampp/htdocs/sp-hospital-ms# sudo git pull
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (7/7), done.
From bitbucket.org:surgeryplanet/sp-hospital-ms
6c3214b..bd047fe master -> origin/master
Updating 6c3214b..bd047fe
error: Your local changes to the following files would be overwritten by merge:
app/Http/Controllers/PassportApi/QuoteManagementController.php
Please commit your changes or stash them before you merge.
Aborting
root@ip-172-31-20-213:/opt/lampp/htdocs/sp-hospital-ms# sudo git pull -f
Updating 6c3214b..bd047fe
error: Your local changes to the following files would be overwritten by merge:
app/Http/Controllers/PassportApi/QuoteManagementController.php
Please commit your changes or stash them before you merge.
Aborting
root@ip-172-31-20-213:/opt/lampp/htdocs/sp-hospital-ms#
As you can see it is telling me that I have some local changes in a file with name QuoteManagementController.php. In fact there was no real local change to that file
Then I tried to check the difference by issuing the command show below:git diff --unified=0 app /Http/Controllers/PassportApi/QuoteManagementController.php
The output was:diff --git a/app/Http/Controllers/PassportApi/QuoteManagementController.php b/ap p/Http/Controllers/PassportApi/QuoteManagementController.php
old mode 100644
new mode 100755
Solution:
Run the command given below in your project’s home directory:git config core.filemode false
Thensudo git pull
(only if you need to take the pull)
- MyHospitalNow.com – PROD | Clean all patient user and related quote, bid and file data - March 21, 2020
- Sending Email with attachments in Laravel 5.5 using and PHP & JQuery - February 20, 2020
- How to run php artisan queue:listen in background on Ubuntu or Linux machine - February 6, 2020