To clarify all the steps when using SSH.
git clone [email protected]:User1/Repo1.wiki.git
cd Repo1.wiki
# Now enable Wiki pages in Repo2
git remote add my-fork [email protected]: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:
# [email protected]/User2/Repo2.wiki.git
If it is wrong, then set the correct URL with:
git config --local remote.my-fork.url [email protected]: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
.