【问题标题】:Unable to fork personal github repository无法 fork 个人 github 存储库
【发布时间】:2021-11-11 22:41:02
【问题描述】:

我的个人 git 帐户中有一个 github 存储库,我想分叉。这是一个私人 git repo,只有我可以访问它。但是页面右上角的 Fork 按钮是灰色的,我在设置中找不到启用它的选项。

根据documentation on git,该选项应位于 repo 设置中的“Features”下,但我的 git repo 中的“Features”部分没有与分叉相关的选项(下面的屏幕截图)。该文档还讨论了组织等,但我的帐户与任何组织都没有关联,它是一个个人帐户。请告诉我如何分叉?

【问题讨论】:

    标签: github


    【解决方案1】:

    1.在 GitHub.com 的右上角,点击您的个人资料照片,然后点击您的组织

    2.点击组织旁边的设置。

    3.在左侧边栏中,点击会员权限

    4.在“存储库分叉”下,选择允许私有存储库分叉或允许私有和内部存储库分叉

    5.点击保存

    or

    如果没有与您的帐户相关联的组织,请尝试按照以下步骤操作:-

     1. clone the private repository
     2. make a branch
     3. work on the branch
     4. push the branch to the private repository
     5. goto GitHub and create a pull request from the branch on the private repository
     6. someone else reviews the the pull request and decides to merge it with master on GitHub
     7. delete the branch unless there was a problem and it was not merged then go back to #3
    

    【讨论】:

    • 我的下拉菜单中没有“您的组织”选项,可能是因为没有组织与我的帐户相关联。
    • 我做了一些修改,看看是否有帮助
    【解决方案2】:

    fork 选项在设置中不可用,因为您的 repo 是私有的并且不是由组织(而不是您的个人帐户)托管的。根据我的信息,您不能 fork 自己的存储库,因此您的 fork 按钮是灰色的,因为正如您所提到的,您的个人帐户不属于任何可以选择作为 fork 目标托管帐户的组织的一部分。

    我找到了这个要点,它可能会帮助您手动“分叉”它: https://gist.github.com/0xjac/85097472043b697ab57ba1b1c7530274

    【讨论】:

      猜你喜欢
      • 2020-12-30
      • 2023-02-01
      • 2011-11-04
      • 2012-02-17
      • 1970-01-01
      • 2016-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多