Clone a wiki

The Wiki itself is also a repository with files you can manipulate just like any other repository.  While you can edit the pages online in Bitbucket Cloud, this technique requires that you maintain a TOC for your Wiki.  For this reason, Bitbucket recommends that you edit your Wiki in its repository format at least initially.

Wiki pages appear in the Wiki repository as text files. They have a .wiki extension and you can edit them on your local system with your favorite text editor. If you add a Wiki to a Mercurial repository, its Wiki is also accessible as a Mercurial repository. Alternatively, Wikis added to Git repositories are themselves accessible as a Git repository. Working offline with a Wiki file, you can:

  • clone it

  • add pages

  • add images or other files

When you are done, you push your Wiki back to Bitbucket Cloud. Your changes are live after the push. Working with files in this way, you can create an index of your Wiki.

Cloning your Wiki

To clone your Wiki:

1 $ git clone https://<username>@bitbucket.org/WORKSPACE/MY_REPO/wiki

For example:

1 $ git clone https://alui@bitbucket.org/alui/alui-core.git/wiki

Updating your Wiki pages

  1. Go to the repository's Wiki link in the left panel.
    By default, you see the Wiki Home page.

  2. Click the repository name link before Home to see a list of all your Wiki pages.

  3. Click the Wiki page you want to update.

  4. Click Edit in the top right.

  5. Make your changes to the page content. 
    See Using Wiki Markup in Bitbucket for help using markdown syntax.

  6. Optionally, enter a comment in the Message text box. 
    This comment appears as a commit message and as part of the page history above the relevant commit entry.

  7. Click Save.

Viewing the Wiki page history

Bitbucket maintains a history of each Wiki page. To view the history:

  1. Navigate to the Wiki page.

  2. Press the History button in the top right corner.
    A list of changes for the Wiki page opens.

  3. Click the Commit link for page version you want to see. A screen opens with a comparison of the changes between that version and the previous one.

Additional Help