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

drewdan's avatar
Level 15

Merging into Master from Develop

I am currently in the process of setting up an open source project (my first!).

I have a master branch and a develop branch. My develop branch is currently ahead of master, and I would like to merge the changes from develop into master.

What is the best way to do this. Historically, I have rebased the develop onto master and force pushed. But is this the correct way to do it? Is there a way to do it on Github?

I was hoping to find a laracast video to help, but I have not found one yet, any tips would be appreciated :)

0 likes
5 replies
bobbybouwmann's avatar
Level 88

You have a few options here.

  1. You can create a pull request on your repository of merging develop into master.
  2. You can use the command line to merge it and push it git checkout master && git merge --no-ff develop
  3. You can rebase it like your suggestion

I personally like the second option, but like I said there are a lot of options. Take the one that works best for you.

drewdan's avatar
Level 15

Hey @bobbybouwmann , thanks for the response ;)

In the past, when I have tried to merge using a pull request, develop and master always get out of alignment as it were, one seems to be ahead of the other. Are there some options I should be looking out for?

Cheers

drewdan's avatar
Level 15

I guess I would need to choose rebase and merge? rather than using a merge commit?

bobbybouwmann's avatar

@drewdan They both will merge the branches for you. So both are fine options. However, the difference is in how they merge it for you. You can google what the difference is.

I would personally merge it locally and push it to the upstream on github.

Please or to participate in this conversation.