git - 如何在本地申请 Pull Request?

标签 git github branch git-merge pull-request

我想了解如何在我的本地存储库上应用 pull 请求。

我有以下分支:master、production 和我当前正在处理的功能的功能分支。

假设我完成了我的功能编码,然后我在 GitHub 上打开一个 PullRequest,可能会在它投入生产之前讨论/审查我的代码。

下一步是将该功能分支 merge 到生产环境中(也就是关闭 PullRequest)。

如何在我的本地存储库中应用这些更改? 我是否必须手动将我的本地功能分支 merge 到我的本地生产分支,或者我应该只 pull 服务器生产分支并删除我的本地功能分支?

正确的做法是什么?

最佳答案

你基本上已经描述了如何做到这一点的方法。通常,如果您已经 merge 了您的 Pull Request,那么您可以简单地在您的生产分支上调用 git pull,恕我直言,这通常是首选选项。

如果您想在 merge PR 之前在本地测试功能分支,那么显然您需要调用 git merge 并将本地 feature-branch merge 到您的本地大师

关于git - 如何在本地申请 Pull Request?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59753622/

相关文章:

git - NetBeans 和 Git : shortcut for pushing to remote

git - 自定义 commitlint header 格式

git - composer.lock 应该致力于版本控制吗?

git - 个人账号可以在GitHub上建多少个公共(public)仓库?

windows - Github Windows : New branch created from command line not showing up on github. com

GitLab PHP网站部署

github - 如何在 GitHub 问题中引用文件?

git - 将远程 repo url 从 https 更改为 ssh 安全吗?

git - git rebase是否影响远程分支或本地分支

mercurial - 在 Mercurial 中将一个分支的选定修订 merge 到另一个分支