ste*_*bot 564 git version-control github
所以我首先分叉了一个回购,然后提交了一个分叉的回购.然后我打开了拉取请求.pull请求列出了我想要的所有更改.
在审核了我的拉取请求之后,回购所有者希望我在接受之前做出一些更改.我已经在我的fork中进行了这些更改,现在如何使用这些更改更新pull请求(或者这不是我应该如何处理它)?
she*_*mer 556
你做得对了.拉取请求将自动更新.过程是:
pull请求将自动在pull请求讨论的底部添加新提交(即,它已经存在,向下滚动!)
jmu*_*jmu 74
在GitHub中更新pull请求就像将所需的更改提交到现有分支(与pull请求一起使用)一样简单,但通常也需要将更改压缩到单个提交中:
git checkout yourbranch
git rebase -i origin/master
# Edit command names accordingly
pick 1fc6c95 My pull request
squash 6b2481b Hack hack - will be discarded
squash dd1475d Also discarded
git push -f origin yourbranch
Run Code Online (Sandbox Code Playgroud)
...现在,pull请求只包含一个提交.
关于变基的相关链接:
Vik*_*ngh 10
我用以下步骤做到了:
git reset --hard <commit key of the pull request>git add git commit --amendgit push -f origin <name of the remote branch of pull request>