1

I don't know how it happened, but the fork of a repo dissapeared from my repositories on github.

I have it's code on my computer and I would like to resume working on it as though the fork didn't dissapear. How would I do that?

Thank you in advance.

UPDATE

I don't think it's a duplicate, becase the guys problem in "How can I push to my fork from a clone of the original repo?" is that he cloned and tried to work with original repo, but I worked with my fork, which dissapeared. There's nothing wrong with my actions except for somehow my fork doesn't exist anymore. I would like to recreate the fork and have all the commits and history of the work I've done, which are on my local computer.

Community
  • 1
  • 1
drakonli
  • 2,304
  • 23
  • 29
  • Possible duplicate of [How can I push to my fork from a clone of the original repo?](http://stackoverflow.com/questions/25545613/how-can-i-push-to-my-fork-from-a-clone-of-the-original-repo) – Tim Biegeleisen Sep 07 '16 at 14:21
  • You still have the `.git` directory with the history on your computer, right? – alexis Sep 07 '16 at 14:22
  • Yes, but when I try to push it obviously pushes to unexisting repo. – drakonli Sep 07 '16 at 15:35
  • This can be caused by changing permissions on the fork's parent repository, which was my case. https://docs.github.com/en/enterprise-server@3.2/pull-requests/collaborating-with-pull-requests/working-with-forks/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility – Tone Aug 30 '22 at 17:11

1 Answers1

2

The solve was so simple I feel stupid for not doing it before...

All I had to do is fork the repo again and then use my local files to try and push again - worked.

Dumb me:)

drakonli
  • 2,304
  • 23
  • 29
  • 1
    Just for reference in case others encounter similar problem: It sounds like you somehow lost the remotes in the branch or the upstream branch was unset for your local branch. `git remote add origin git@github.com/dev-name/repo-name` or `git branch working-branch --set-upstream-to origin/working-branch`may have been possible solutions to fix it without needing to make a new fork or reclone the original repo. – William Patton Sep 08 '16 at 14:30