git - 为什么我不能在 BitBucket 中为 pull 请求指定另一个存储库?

标签 git bitbucket pull-request

我想从我的代码库中提取更改到第一个团队。由于我的 repo 是第一个创建的,所以第一个团队是通过导入创建的。不幸的是,BitBucket 不允许我为其创建 PR(目标存储库的下 pull 菜单仅是我自己的存储库)。

为什么我不能指定另一个存储库? 必须我 fork 它,PR 才能工作吗? 毕竟,git root 和提交历史相同且有效的 PR 需要源代码库/分支和目标代码库/分支?

关于 PR 状态的 Atlassian 文档:

you need to provide 4 pieces of information to file a pull request: the source repository, the source branch, the destination repository, and the destination branch.

因此没有提及必要的远程信息,也没有提及 pull 请求目标的合格存储库。

此外:

Pull requests can also be used to collaborate with other developers outside of the official project. For example, if a developer was working on a feature with a teammate, they could file a pull request using the teammate’s Bitbucket repository for the destination instead of the official project. They would then use the same feature branch for the source and destination branches.

这意味着我应该能够请求将我的更改 pull 到队友存储库中。当您 fork 存储库时是否传递了一些 secret 信息,而当您复制/粘贴它或从头开始克隆它时不会传递这些信息?我的意思是,我只想到 Remote ,但在进行 PR 时设置 Remote 并不难。

我查阅的 Atlassian 文档:

最佳答案

是的,您必须从中央目标存储库中派生它。

克隆源,将克隆重命名为“上游”,然后推送到您自己的源存储库,您希望从中向上游发出 pull 请求,这是行不通的。

关于git - 为什么我不能在 BitBucket 中为 pull 请求指定另一个存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29633910/

相关文章:

git - 使用 meld 作为 diff 工具时查看 git 过滤器输出

git - 使用公钥/私钥推送到 TFS git

git - 连接 Bitbucket 时更改 SSH 用户名

Git 桥接 Mercurial

github-actions - GitHub 操作 : how to build a pull request as if it were merged?

rest - 有没有办法使用 API 列出拉取请求文件(来自源分支)及其在 Azure Devops 中的位置?还有其他使用C#的方法吗?

git - 从 github 构建 docker 镜像 - 子模块不克隆

database - 如何将相关应用程序组织到 git repo 中?

mercurial - hg clone 在命令之间发送时挂起

github - 合并 GitHub 拉取请求,可能首先对其进行更改