Add Github fork to existing repository

后端 未结 3 893
借酒劲吻你
借酒劲吻你 2021-01-01 12:57

I setup an Octopress project following the given instructions (http://octopress.org/docs/setup/) which have you create a Github repository, and create a local repository on

3条回答
  •  时光取名叫无心
    2021-01-01 13:44

    If I understand the OP. They have a Git repo, and they have now decided that it should have forked another repo. Retroactively they would like it to become a fork, without disrupting the team that uses the repo by needing them to target a new repo.

    I've thought about renaming a new repo into place. so if the team current clones, and fetchs, and pulls example.git

    1. setup a new repo that is a fork, example_fork.git
    2. rename example.git to example_deprecated.git
    3. quickly rename example_fork.git to example.git.

    I've heard that anyone who already had a clone would be met with an error of sorts (so that doesn't avoid the inconvenience as well as I would hope)

    I've also seen suggestions to use Force Push: Marking a repo as a fork in github, after the fact

    .

    But now I'm wondering if topic of discussion is more accurately worded as "setting the upstream remote of an existing repository". Discussed here: Adding remote upstream to git repo on bit bucket

    based on the feedback provided here: What does 'git remote add upstream' help achieve? I think it would basically allow retroactive forking like I want, and like I think the OP is asking for.

    I have not tried it yet.

提交回复
热议问题