在github上管理共享回购站的pull请求的工作流程 [英] Workflow for managing pull requests on shared repos in github

查看:83
本文介绍了在github上管理共享回购站的pull请求的工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图管理一个我没有拥有管理权限的回购请求。当我尝试从另一个分支引入更改时,它会失败,并显示比清除更少的错误。这是我的工作流程...
$ b


  1. 分叉主回购

  2. 在分叉中进行更改
  3. li>
  4. 向该分支提交 -
    3.5(转至步骤2) 向主repo提交pull请求
  5. b $ b

作为主要仓库的管理员,我试图按如下方式合并这些更改...


  1. git clone git@github.com:dude / project.git

  2. git checkout -b gtracy-master master

  3. git pull http://gtracy@github.com/gtracy/ project.git master

输入密码后,我收到错误消息...

 错误:请求的URL在访问
http://gtracy@github.com/gtracy/project时返回错误:401。 git / ifno / refs

这个工作流错了吗?有没有更容易的方法来管理我自己的拉请求?



谢谢!

解决方案

GitHubpull request帮助页面没有提到它,但我更愿意在提交任何请求之前在原始仓库的分支之上重新分配我的工作。<$ em>

也就是说,我会将原始仓库添加为远程仓库,获取我的pull请求将最终应用到的分支,并首先在本地(在我的fork中)重新分配我的工作在该分支的顶部。

这样我就可以确保我的所有请求都是快速转发一个。

就你而言,如果你知道在原始回购库中没有发布任何更改,则可能不适用,因为你已经分叉并处理了本地回购。

对于第二部分,我会按照 MERG并且将你的分叉回购作为你的原始回购克隆的远程存储。



这就是说,错误401Unauthorized被提及在 GitHub智能HTTP页面中:


不要忘记https部分 - Git会通过线路发送您的密码哈希值但未加密,因此请务必使用SSL。

在未来的Git版本中(假设我们的补丁已经集成),Git会提示您输入用户名,如果没有提供,并且客户端获得401,那么您实际上不必将您的用户名放入URL中 - 只会在Git需要时询问你。


因此,如果您想在您的地址中使用用户名,请尝试使用https。 >
或尝试 http://github.com/gtracy/project.git (公共回购地址)


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...

  1. Fork main repo
  2. Make changes in that fork
  3. Commit to that fork
    3.5 (goto step 2)
  4. Submit a pull request to the main repo

As an administrator of the main repo, I'm attempting to merge those changes as follows...

  1. git clone git@github.com:dude/project.git
  2. git checkout -b gtracy-master master
  3. git pull http://gtracy@github.com/gtracy/project.git master

After entering my password, I get the error message...

error: The requested URL returned error: 401 while accessing 
http://gtracy@github.com/gtracy/project.git/ifno/refs

Is this workflow wrong? Is there an easier way to manage my own pull requests?

Thanks!

解决方案

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:

Don't forget the https part - Git will send your password hashed but unencrypted over the wire, so be sure to use SSL.
In future versions of Git (assuming our patch gets integrated), Git will prompt you for your username if it's not provided and the client gets a 401, so you won't actually have to put your username in the URL - it will just ask you when Git needs it.

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)

这篇关于在github上管理共享回购站的pull请求的工作流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆