我想了解如何从 Intellij 中执行 pull 请求。我知道这听起来是面向工具的,但我仍然认为我遗漏了一些不一定明确解释的东西。
我想为我在 github 上没有写入权限的项目做出贡献。那么我是否应该首先创建一个分支,然后在我的机器中创建一个我的分支的克隆,然后从那里将我的更改推送到其中,并从该分支在线执行 pull 请求?
因为到目前为止我已经克隆了 repo,完成了我的更改,在本地提交它们,然后尝试使用 intellij 执行 pull 请求,但我得到了 403。
所以我想知道我有什么选择。
最佳答案
So shall i first create a fork and then a clone of my fork in my machine, then from there, push my change into it, and do the pull request from that fork online?
so far i have cloned the repo, done my changes, commit them locally, then try to do a pull request with intellij
如果通过“克隆 repo ”,你的意思是原始 repo (而不是你的 fork ),你可以rename that origin
as upstream
,并将新的远程“origin
”添加到您的分支。
git remote rename origin upstream
git remote add origin https://github.com/you/yourFork
关于git - pull 请求和 Intellij,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32417684/