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

peterlc's avatar

git structure and Envoyer

Hi guys,

In new to git so maybe im doing this wrong but here is my setup:

In BitBucket i have a repo called www.site.se and it has 3 branches dev, stage and www. dev is not for deploying it is the "base" of all work. when i want to show the customer an function or what not i push local dev branch to remote stage branch then Envoyer deploys to the site stage.site.se and the customer can interact. After approval i do an push local dev branch to remote www branch and it is all live. Just noticed that i must close my phpStorm between checking out another branch otherwise the minify script goes bananas.

I have stage.site.se and www.site.se as 2 separate projects in Envoyer but both dev->stage and dev->www triggers deploy on both even though i set Deploy Branch to stage in stage.site.se and www in www.site.se.

I guess my idea of having one repo with separate sites (stage and www) is not okay.

Is it better do have 3 separate repos like dev.site.se, stage.site.se and www.site.se?

So to clarify my question, is it better to have different branches for the same site rather than have an specific branch act for an separate site?

0 likes
1 reply
ejdelmonico's avatar

Well, I know from my perspective, I use a master branch, a dev branch and a features branch if necessary. I use the features branch testing new features and fixes to old features. I then merge with the dev branch which I push to staging server for testing. If all is well, I merge with master and that pushes to production. That is pretty much what you will find depending on company requirements and the size of the project.

Please or to participate in this conversation.