git - pull 请求和 Intellij

标签 git github intellij-idea

我想了解如何从 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?

那是recommended workflow .

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/

相关文章:

node.js - 如何将nodejs代码从本地计算机部署到google app引擎

git - 由于与本地排除文件冲突,无法 git pull

wordpress - 推送到 git 存储库子文件夹上的远程源?

git clone 获取 gh-pages,我希望它克隆 master(来自 Github)

java - 错误 : Exception in thread "main" java. lang.NullPointerException

git - 查找目录下所有一级子目录的事件 git 分支

gitattributes 没有正确设置 merge 驱动程序

.net - 组织用于 Azure/GitHub 发布的 n 层应用程序分支

intellij-idea - 如何启用 Flutter/Dart 语言实验?

intellij-idea - 在 IntelliJ Idea/PyCharm 'Run' 面板中隐藏 stderr?