-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub desktop cannot automatically prompt me to create a fork #13165
Comments
Thanks for the issue @qqingyufeng. It looks like that article needs to be updated -- the dialog to fork a repository will appear when you attempt to push to a repository that you do not have write access to. For reference you should see a dialog that looks like this: Clicking Thanks for pointing this out! |
Similar to #17195 I have some repositories where forks should have been created but instead they are clones. Here is one that does not (no sync fork line). Both 'well-behaved' clones/forks and problematic repo pairs have apparently valid looking remote strings of the form...
So is the documentation in error? I'd like to be able to 'reconnect of origin repos to their upstreams so I can contribute to said upstreams.
In the meantime what is the best workaround? Only create forks via Github.com, and not GitHub Desktop?? Bruce |
@CaverBruce cloning a repository that you do not have push access to does not automatically create a fork -- you will need to create the fork on github.com and then clone that. However, if you clone a repository that you do not have push access to and then attempt to push to it you will be prompted to create a fork of that repository. The local repository will then become a fork. The second screenshot you shared does not look like a fork, as it does not have the I hope that helps clarify things, but let me know if you have any further questions. |
Thanks steveward. What you say makes sense, however for two clone/'fork' pairs of repos I cannot replicate this behaviour. Although I have four clone/fork pairs of repos that are working perfectly afaik for some years. So I'll take on board that best practice is to fork directly using Github.com. However to test the Github Desktop route (to fork creation) and recover from my immediate impasse I deleted one repo's github.com clone and removed it from Github Desktop, TortoiseGit and local drive, and started afresh creating a clone using GitHub Desktop. Just to test whether 'not creating a new branch' was the cause of my pain, I then deleted the other repo's github clone etc., and again created a new clone using GitHub Desktop. It remains a mystery to me what caused the original incarnations of the above two clones not to be able to be converted to or recognised as forks. I feel like the above replicated the likely processes I used to create the problem clones. Perhaps it was because Desktop behaviour has changes due to software updates since they were created, and these broke Desktop's and github.com's 'fork detection' behaviour? I was happy to delete the above repos and start again, since the changes I wished to make were trivial. If that was not the case, I have been able merge unrelated repositories before using the command line ( merge --allow-unrelated-histories) but this seems a messy way to resolve the @qqingyufeng 's issue, as it will create duplicate very similar histories. So undesirable. One more question. It seems to me that there must be some setting, remote string perhaps (or github.com setting since fork is not a git construct), that tells a repo that it is a fork of another. Can a user manually access or tweak this setting? This https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository suggests it is possible(?) |
It isn't possibly to move a repository to become a fork of an existing repository, since fork networks on GitHub are a rather complicated thing. |
Thanks Steve, that answers my question. |
According to document
When you try to use GitHub Desktop to clone a repository that you do not have write access to, GitHub Desktop will prompt you to create a fork automatically.
but my GitHub Desktop cannot automatically prompt me to create a fork.
I don't know where the setting is wrong
The text was updated successfully, but these errors were encountered: