我如何将拉取请求合并到我的github项目的特性分支中? [英] How do I merge a pull request into a feature branch of my github project?
问题描述
这是可能的!首先创建一个功能分支:
$ git checkout -b我的功能
然后将拉取请求的更改合并到您的新功能分支中:
$ git pull https://github.com/user/fork.git
在一个新的提交中进行小调整:
$ $ p $ $#make changes
$ git commit -am我的小改动
然后将您的功能分支合并到master中,并推送到github。
$ git checkout master
$ git merge my-feature
$ git push origin master
这会反映在github.com上的pull请求中,如果您愿意,可以发表评论感谢提交者。
Someone has submitted a pull request to my GitHub project from a fork. Rather than merging directly into master, I would prefer to merge the changes into a feature branch so that I can make some minor edits before merging the final product into master. If at all possible, I'd like GitHub to indicate to the submitter that the request was accepted (I want to encourage and recognize contributions!). Is this possible? How do I go about it?
This is possible! First create a feature branch:
$ git checkout -b my-feature
Then pull and merge the pull request's changes to your new feature branch:
$ git pull https://github.com/user/fork.git
Make your minor adjustments in a new commit:
$ # make changes
$ git commit -am "my minor changes"
Then merge your feature branch into master and push to github.
$ git checkout master
$ git merge my-feature
$ git push origin master
This will be reflected on the pull request on github.com, and you can leave a comment thanking the submitter if you like.
这篇关于我如何将拉取请求合并到我的github项目的特性分支中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!