I searched this problem many times, but still cannot resolve it.
Say, I fork a repo (let's name it repo1) from user1, and now I would like to fork the Wiki section of that repo as well, which GitHub won't do for you when you fork the repo.
I tried these commands:
git clone https://github.com/user1/repo1.wiki.git
git remote add my-fork https://github.com/myid/repo1.wiki.git
git push my-fork master
but the terminal prints:
fatal: remote error: access denied or repository not exported: /3/nw/32/2b/9e/135236793/71478887.wiki.git
which means that I cannot successfully push this local wiki to the Wiki section of my forked repo.
Does anyone have ideas about what's wrong here?
Thanks.
To push a branch on remote, your branch needs to have the latest changes present in remote repository. If you get the failed to push error, first do git pull the branch to get the latest commits and then push it.
Adding wiki pagesOn GitHub.com, navigate to the main page of the repository. Under your repository name, click Wiki. In the upper-right corner of the page, click New Page. Optionally, to write in a format other than Markdown, use the Edit mode drop-down menu, and click a different format.
You need to create the wiki first in your GitHub repository:
Open the following URL in your browser:
https://github.com/myid/repo1/wiki
Press Create the first page and then Save Page buttons:
Now you can push (the first push should be with -f
option):
git push -f my-fork
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With