You would create a second branch and deploy that branch to the staging environment.
You can create a branch by doing, and then you can push that of course
git checkout -b staging
git push
At that point, you have two branches setup
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How do I create a stagin section on git? ATM I have a repository, and once I finish my work I just do the following
git add .
git commit -m 'changes'
git push
And this updates my repository. But what if I wanted to go to staging for review and work there and when everything is fine push to repo?
Please or to participate in this conversation.