36

I created a wiki page in my project's GitHub repository, for storing some loose notes and links, and GitHub automatically created a wiki page called "Home", containing the text "Welcome to the [repository] wiki!"

There are two problems with that. First, the new "Home" page is completely useless to me. Second, and most importantly: in order to access the page I created, I have to click the "wiki" link from the repository home page, and then the "Pages" tab, and then the link to the actual wiki page I created.

So I decided to move the content to the "Home" wiki page, to make it more easily accessible. Since there doesn't seem to be a "rename" function for GitHub wiki pages, I simply copied the contents of my page to the "Home" page.

Now, how do I delete the original wiki page so it doesn't clutter my repository?

2
  • It turns out one can rename pages by simply changing their title in the edit view. This is valid as long as the target page title doesn't exist. Because GitHub automatically creates a useless "Home" page when you create your first wiki page, you have to delete "Home" first and only then move your page to the "Home" title. This should preserve the edit history rather than copy-pasting the contents.
    – waldyrious
    Commented Dec 19, 2012 at 5:18
  • Side note for future people googling this problem: you cannot delete home wiki. Commented Dec 1, 2015 at 14:15

3 Answers 3

28

As mentioned on this thread of the GitHub Google group, repository owners can delete pages from the edit view.

The delete button might be easy to miss, since the buttons from the view mode:

Imgur

...become only slightly different in edit mode:

Imgur

Perhaps GitHub should consider making the interface more obvious (e.g. making the delete button red, or something like that)

2
  • 1
    The delete button has now red text.
    – ProgramFOX
    Commented Mar 1, 2015 at 11:10
  • 5
    The delete button is now gone. Or at least it is not shown if it's the only wiki page... Commented Sep 17, 2015 at 17:26
9

A longer alternative is to checkout the repository for the wiki and manually delete the file containing the page contents using git rm and then checking in the changes back to the wiki repository.

Useful if you can't find the delete button on the web interface, or you are more of the command line user.

1
  • 4
    For clarity, the git wiki is stored in a separate repository, which can be accessed through the "Git access" tab of the wiki. It should be something like [email protected]:<user>/<repo>.wiki.git
    – waldyrious
    Commented Dec 21, 2012 at 17:19
3

It's possible with git:

git clone https://github.com/ORG/REPO.wiki.git
cd REPO.wiki
rm Home.md
git add .
git commit -m "remove wiki homepage"
git push

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.