To clarify all the steps when using SSH.
git clone git@github.com:User1/Repo1.wiki.git
cd Repo1.wiki
# Now enable Wiki pages in Repo2
git remote add my-fork git@github.com:User2/Repo2.wiki.git
Pay attention to the use of :
vs. /
when using SSH. If something goes wrong here, you can't just repeat this command, so you need to manually change the url. To check what it is pointing to, use:
git config --local -l
# For example, this is wrong:
# remote.my-fork.url=git@github.com/User2/Repo2.wiki.git
If it is wrong, then set the correct URL with:
git config --local remote.my-fork.url git@github.com:User2/Repo2.wiki.git
Now you can continue with:
git push my-fork -f --no-tags
Where -f
is shorthand for --force
to overwrite all refs
.