如何从 master 向 staging 分支发出拉取请求?

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

我对master有很多改变。我想对登台分支发出拉取请求,以便它以后可以合并到登台。我尝试了下图,但没有任何变化

我该如何解决这个问题?

变基

如果您要确保分段恢复到与 'master' 相同的状态,您可以 "re-base" 它:

来自 'staging' 分支

git rebase master


或者:

您确定将本地提交推送到 github(远程)吗?

首先确保您在新分支上:

git checkout staging

** 对本地文件进行一些修改example.js

暂存在项目目录中所做的任何更改:

git add .

在本地提交更改:

git commit -m "My commit message"

将提交推送到远程 (github):

git push origin staging

如果您尝试在 github 上向 'master' 发出拉取请求,您现在应该会看到新的提交。

将基数从 master 切换到 staging。基本分支是您要合并到的分支。

此外,Github解释说:

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.