用于管理 github 中共享存储库上的拉取请求的工作流程
我正在尝试管理我不拥有但具有管理员权限的存储库上的拉取请求。当我尝试从另一个分支中提取更改时,它失败并出现不太清楚的错误。这是我的工作流程...
- Fork main repo
- 在该 fork 中进行更改
- 提交到该 fork
3.5(转到步骤 2) - 向主存储库提交拉取请求
作为主存储库的管理员,我尝试按如下方式合并这些更改...
git clone [电子邮件受保护]:dude/project.git
git checkout -b gtracy-master master< /code>
git pull http://[电子邮件受保护] /gtracy/project.git master
输入密码后,我收到错误消息...
error: The requested URL returned error: 401 while accessing
http://[email protected]/gtracy/project.git/ifno/refs
此工作流程是否错误?有没有更简单的方法来管理我自己的拉取请求?
谢谢!
I'm trying to manage a pull request on a repo that I don't own but have admin rights on. When I attempt to pull in changes from another fork, it fails with an error that is less than clear. Here is my workflow...
- Fork main repo
- Make changes in that fork
- Commit to that fork
3.5 (goto step 2) - Submit a pull request to the main repo
As an administrator of the main repo, I'm attempting to merge those changes as follows...
git clone [email protected]:dude/project.git
git checkout -b gtracy-master master
git pull http://[email protected]/gtracy/project.git master
After entering my password, I get the error message...
error: The requested URL returned error: 401 while accessing
http://[email protected]/gtracy/project.git/ifno/refs
Is this workflow wrong? Is there an easier way to manage my own pull requests?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GitHub“拉取请求”帮助页面没有提及它,但我更喜欢重新调整我的工作在提交任何拉取请求之前,在原始存储库的分支顶部的分叉中完成。
也就是说,我会将原始存储库添加为远程仓库,获取我的拉取请求最终将应用到的分支,并首先在该分支之上本地(在我的分叉内)重新设置我的工作。
这样我就可以确保我的所有拉取请求都将是快进请求。
但就您而言,如果您知道自您分叉并处理本地存储库以来原始存储库中尚未发布任何更改,则这可能不适用。
对于第二部分,我将遵循“合并拉取请求”部分,并添加您的分叉存储库作为原始存储库克隆的远程版本。
话虽如此,GitHub Smart HTTP 页面中提到了错误 401“未经授权” :
因此,如果您想在地址中使用用户名,请尝试使用 https。
或者尝试使用
http://github.com/gtracy/project.git
(公共存储库地址)The GitHub "pull request" help page don't mention it, but I prefer rebasing my work done in a fork on top of the branch from the original repo before submitting any pull request.
That is, I would add the original repo as a remote, fetch the branch to which my pull request will eventually apply, and rebase first my work locally (within my fork) on top of that branch.
That way I make sure all my pull requests will be fast-forwards one.
In your case though, that may not apply if you know that no changes has been published in the original repo since you have forked and worked on your local repo.
For your second part, I would follow the "Merging pull request" part, and add your forked repo as a remote of your original repo clone.
That being said, error 401 "Unauthorized" is mentioned in the GitHub Smart HTTP page:
So if you want to use the username in your address, try with https.
Or try with
http://github.com/gtracy/project.git
(public repo address)