Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Problems after several months with Laravel Forge


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 
* branch master -> FETCH_HEAD
35e743e..aa18902 master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
Please commit your changes or stash them before you merge.
Updating 3856d4a..aa18902

 or this:

Sun Feb 19 14:21:47 UTC 2023 
From * 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.

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 21, 2023

Hi @Gioacchino Poletto,

What command is executed when you get the errors you posted here? Is it a git pull or git fetch?

And where are the commands executed? On a clone of the repo on the Forge server? Or on your local repo? Or is one of them on the Forge server and the other one on your local repo?

The error in the first output you posted here indicates that there are changes in the working directory of that specific clone that have not been committed yet. You can either commit them (so that you don't lose them), or if you want to discard the changes that haven't been committed, run git reset --hard.

The second error is different. One possible cause for this error is having in the clone two branches with the same name and different capitalization. You can use the command git branch in the clone to see if there is perhaps a second branch named master with different capitalization.

If this is not the case, you can try removing the local ref refs/remotes/origin/master by running

git update-ref -d refs/remotes/origin/master

and then do a git pull or git fetch again. This will not delete anything on the Bitbucket repo, it will only remove the local ref, which should be fetched again once you run git fetch or git pull.

Kind regards,

Dear @Theodora Boudale ,
many thanks for your reply, much appreciated!

I have try also this solution, but finally I have solved the problem stopping and restarting Forge Quick Deploy.

Probably, during the first boot you had saved two auto deploy settings and each push generated 2 deploy instances. 

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 22, 2023

Thank you for the update @Gioacchino Poletto, it's good to hear that you resolved the issue.

Please feel free to reach out if you ever need anything else!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events