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

Kris01's avatar

Git Staging

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?

0 likes
4 replies
bobbybouwmann's avatar

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

1 like
Sinnbeck's avatar

@Kris01 it is up to you. You can also ask other team members to pull your branch and do a code review (or even do it right on github). They might want to test it out on their computer

Please or to participate in this conversation.