Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dmhall0's avatar

Deployment Aborting?

I am using Bitbucket, DigitalOcean, and LaravelForge. Recently went I went to push some changes I received the following error:

error: Your local changes to the following files would be overwritten by merge:
	storage/fonts/dompdf_font_family_cache.php
Please commit your changes or stash them before you merge.
Aborting

I have deleted the files from my local machine, forced the push, and am still getting the same error. I have even checked the git file list and the file is not there. What is going on? How can I fix this?

Thanks for the help!

0 likes
6 replies
fylzero's avatar

@dmhall0 I'll often add git reset --hard HEAD at the very top (first line, before the git pull command) of my deploy script in Forge to avoid such issues. It means exactly what it says. Some Git watched file has been modified and can't do a pull until that file is reset.

1 like
dmhall0's avatar

I did git reset --hard and git clean -df and then git push --force and I am still having the same issue.

Any ideas?

fylzero's avatar

@dmhall0 What do you mean you "did" them? Did you run the commands locally? You need to add that to your deploy script in Forge for this to work. Or SSH into forge and run this in your project folder. I would highly recommend adding it to the deploy script as there are a number of things that can cause these type of errors. The problem is on the server, not locally.

1 like
dmhall0's avatar

I did it local and nothing happened. Then I put `git reset --hard HEAD' in my deploy script as suggested and I got this error

Fri Jan 8 20:53:02 UTC 2021
fatal: not a git repository (or any of the parent directories): .git

along with saying there is an issue with my SSH key.

fylzero's avatar

@dmhall0 Something is really off here. You added this to your deploy script on Forge, right? Are you even deploying on Forge with a Github repo?

1 like
dmhall0's avatar

Correct... first line in my deployment script on Forge. I am using BitBucket. I have been deploying for months and then literally this came out of nowhere. I didn't touch this file or its associated files at all. I appreciate your help. I have someone looking into it.

Please or to participate in this conversation.