Fork from a branch in github

前端 未结 8 706
名媛妹妹
名媛妹妹 2021-01-30 09:26

Is there a way to fork from a specific branch on GitHub? … For example, moodle has many branches (1.9, 2.0 … and so on). Can a clone be performed of just branch 1.9 and not the

8条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 09:48

    I'm using bitbucket but I'm sure this would work for GitHub as well.

    1. Create a new repository
    2. Checkout the branch using GitExtensions
    3. Click Push to open the Push dialog
    4. Set the destination URL to the new repository
    5. Set the destination branch to "master"
    6. Push

    Your new repository will have the full history of the one branch only (not all branches like forking will have).

提交回复
热议问题