简体   繁体   中英

Editing a wiki on a github repo

I am trying to edit and make changes on another persons wiki for their repo. I cloned it locally with the following:

git clone https://github.com/***/***.wiki.git

I then edited it and completed the desired changes. Now, how do I go about pushing said changes? Do I need to open a pull request for this and how would I go about it? Any help would be greatly appreciated. I tried to push changes on the same remote origin branch but I get the Permission denied (publickey) error.

There are two problems here. The first is that you actually seemed to have cloned at ssh linked git repository such as

git@github.com:/***/**.wiki.git

And thus why it is saying Permission denied (publickey) . If you'd cloned a https git repo then you would type username / password.

As to how to edit a github wiki locally - By default the branch is master. If you choose to work on sub-branches to separate the work, then you'll need to merge to your local master branch and push. There doesn't seem to be a way to have pull requests for wiki pages.


In summary:

  1. If not done, setup your public/private ssh key in github - https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
  2. Checkout your repo locally - git clone git@github.com:/***/**.wiki.git
  3. Optionally branch so as to separate the work(s) - git checkout -b some_branch
  4. Edit your wiki pages with a markdown editor (I used IntelliJ with a Markdown plugin - it can display the markdown on one page and the rendered page next to it, which is nice.)
  5. Add and commit your work: git add page.md git commit -m "Added blah blah instructions"
  6. Optionally merge back to master: git checkout master git merge some_branch
  7. Push it back to the github repo - git push

Remember, you can't seem to be able to do pull requests with github wiki pages (since the only branch available through Github is master).

Not possible!

Though, you could open an issue to ask the mainter(s) to make the wiki publicly editable .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM