Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I undo deleting a github wiki page?

Tags:

github

I deleted a page on a github repo's wiki.

Clicking on the link to the file now brings me to a new edit screen. I thought this might be in my fork of the repo, but following the link in incognito mode on chrome gives me the error that I do not have permission to edit this file (presumably because I am trying to create it and I am not logged in in incognito).

I know you can revert changes in files, but how do I revert deleting a file on a github repo's wiki?

like image 724
Boris Avatar asked Jul 17 '14 07:07

Boris


1 Answers

You can clone the wiki repo of your project, and restore that page locally.

git clone https://[email protected]/myusername/foobar.wiki.git
git checkout $(git rev-list -n 1 HEAD -- yourPage)^ -- yourPage

Then you push back to the wiki repo on GitHub: that should allow it to display your page again.

like image 96
VonC Avatar answered Oct 24 '22 20:10

VonC