6

In the GitLab Wiki section, it is possible to see the history of when changes were saved. However when you click on the commit link, it will show the entire file as it existed on that save. Does anyone know of a way to diff the commits to only get the differences between the two commits?

This would be similar to how it occurs in the Merge Request section where it diff's the Source and Target branches and shows the differences between them.

elyod72
  • 125
  • 7

2 Answers2

7

This feature is now available since Gitlab 13.2.

Similar to versioned diff file views, you can see the changes made in a given Wiki page version:

  1. Navigate to the Wiki page you’re interested in.
  2. Click on Page history to see all page versions.
  3. Click on the commit message in the Changes column for the version you’re interested in:

Source: https://docs.gitlab.com/ee/user/project/wiki/#viewing-the-changes-between-page-versions

mrek
  • 1,655
  • 1
  • 21
  • 34
5

I'm not sure about viewing the diff in in the GUI (googling leads to a bunch of open issues), but you could always clone the wiki (which is stored as a separate git repository) and diff locally.

Since wikis are based on Git repositories, you can clone them locally and edit them like you would do with every other Git repository.

On the right sidebar, click on Clone repository and follow the on-screen instructions

-- https://docs.gitlab.com/ce/user/project/wiki/#adding-and-editing-wiki-pages-locally

In the Gitlab version I'm working with, you can find the "Clone repository" button on https://yourdomain/<group>/<project>/-/wikis/pages, i.e. when listing all wiki pages. The wiki git repository is located at <group>/<project>.wiki.git

chelmertz
  • 20,399
  • 5
  • 40
  • 46