Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a pull request from the master to the staging branch?

Tags:

git

github

I have many changes in the master. I want to do a pull request to the staging branch so that it can later merge to staging. I tried as the picture below, but nothing changes

enter image description here

How can I solve this problem?

like image 441
moses toh Avatar asked Oct 27 '25 14:10

moses toh


2 Answers

Rebase

If you are trying to ensure staging is back at the same state as 'master' you can "re-base" it:

From the 'staging' branch

git rebase master


Alternatively:

Have you made sure to push your local commits to github (remote) ?

First ensure you're on the new branch:

git checkout staging

** Make some changes to local files example.js

Stage any changes made in the project directory:

git add .

Commit the changes locally:

git commit -m "My commit message"

Push the commit to the remote (github):

git push origin staging

If you try to make a pull request into 'master' on github you should now see the new commit.

like image 184
retryW Avatar answered Oct 30 '25 03:10

retryW


Switch the base from master to staging. The base branch is the branch that you are going to merge into.

Furthermore, Github explains:

After initializing a pull request, you'll see a review page that shows a high-level overview of the changes between your branch (the compare branch) and the repository's base branch.

like image 26
gigalul Avatar answered Oct 30 '25 05:10

gigalul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!