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

elliotk's avatar

Help with git conflict / Laravel Forge

Hello,

I need some help.

I am using a package shipu/themevel

It creates themes in a "Themes" root directory, with a sub directory of "themename".

Themes/theme1
Themes/theme2

When i commit my first theme, all works as expected.

After a second or third, when I deploy in Forge, I'm getting the following error:

Mon Oct 30 20:43:41 UTC 2017
From bitbucket.org:user/blog
 * branch            master     -> FETCH_HEAD
   a4e1f26..31bf12c  master     -> origin/master
error: The following untracked working tree files would be overwritten by merge:
    public/Themes
Please move or remove them before you can merge.
Aborting
Updating a4e1f26..31bf12c

On closer inspection, the timestamp on the Themes folder is being updated every-time a new theme is created.

It's using the Laravel File System to do this:

https://laravel.com/docs/5.5/filesystem#directories

Storage::makeDirectory($directory);

A full path name is being passed: /Users/elliot/Code/blog/Themes/theme2

I presume it must be something to do with that, but i've got no idea how to either rewrite the creation of the directory, so only the last folder is created if the parent ones already exist or to stop git throwing an error in Laravel Forge.

Any advice?

0 likes
3 replies
mushood's avatar

I dont use laravel forge so I cant say precisely

As for the git issue, try to see if you can "version" the themes instead of overriding. In that way, you wont have any conflicts since each file would be a seperate one.

elliotk's avatar

Thanks @mushood how would I go about doing that? The "Themes" directory is just a folder, of folders, there are no files in it.

mushood's avatar

From the error message:

error: The following untracked working tree files would be overwritten by merge:
    public/Themes

Why is it "untracked" if it was committed to git? I am a little confused.

Please or to participate in this conversation.