你如何更改默认的基本叉为github拉请求? [英] How do you change the default base fork for a github pull request?

查看:194
本文介绍了你如何更改默认的基本叉为github拉请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我提交一个pull请求到合并一个特性分支到我自己的github仓库的master分支时,默认值总是我分叉的原始仓库(见附图)。如何将默认的基础存储库更改为mbigras / phase-0-tracks而不是Devbootcamp / phase-0-tracks?谢谢!

解决方案

您可以尝试以下操作:



再次在本地创建分支,并使用与要合并的分支相同的名称和内容,它必须推送到该分支以重新创建远程分支;然后重新打开公关到分支。
例如,您有一个PR到branch1,它被删除。您现在想要合并并掌握并保留您现有PR中的评论。

  git checkout master 
git pull
git checkout -b branch1
git push

重新打开您的PR到branch1。



合并到branch1时,合并到master。


Whenever I submit a pull request to a merge a feature branch into the master branch of my own github repository the default value is always the original repository that I forked (see attached screenshot). How do I change the default Base repository to mbigras/phase-0-tracks instead of Devbootcamp/phase-0-tracks? Thanks!

解决方案

You could try the following:

Create the branch again locally with the same name and the same contents the branch you want to merge to, it has to push to that branch to recreate the remote branch; and then reopen the PR to the branch. For example, you have a PR to branch1, which is deleted. You now want to merge to master and retain comments on your existing PR.

git checkout master
git pull
git checkout -b branch1
git push

Reopen your PR to branch1.

When merged to branch1, merge to master.

这篇关于你如何更改默认的基本叉为github拉请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆