我在使用git命令行使用pull request时遇到问题。假设我有一个名为“稳定”的分支,它的行为类似于我的主分支。所以我有一个叫做'mybranch‘的分支,它来自于稳定。我在'mybranch‘中更新了我的代码,现在我想使用git bash命令行向我的分支发出一个到稳定的拉请求。我使用github作为我的git代码库。我尝试了以下几种方法:
git checkout stable这使我成为马房分部的成员。要为我的分支发出拉取请求,我使用以下命令:
git pull origin mybranch然后,我将稳定分支更新为github代码库: git push origin update将我的‘稳定’分支推送到github上。但是,我看不到我的分支被合并或被拉到稳定分支。我不知道我是不是做错了什么。有什么建议吗?
发布于 2014-03-03 13:36:37
呼!你混合了很多东西:-)
git pull不同于github pull-requests
- you need to create a branch ( git checkout -b mybranch )
- update some code there ( edit any file )
- add the changes to stage ( git add "filename" )
- commit them ( git commit -m "message for commit" )
- push the branch to github ( push push origin mybranch )
- go to github.com and [create a request to get your code reviewed in github](https://help.github.com/articles/using-pull-requests) ( read: pull-request )
- above step can also be done using command line using "[github hub](https://github.com/github/hub)"
- merge your mybranch to stable from github web interface or using "github hub"
- come back to stable branch ( git checkout stable )
- pull the latest changes for your stable branch ( git pull )
注意:过多地混合概念对健康非常有害:)
https://stackoverflow.com/questions/22136102
复制相似问题