Viewing Differences in Source Control Files—Git

One of the benefits of Lingo's integrated source control is that you can view the history and differences for a particular file.

Ways to View Differences Between Files

You can view differences between files in the following ways:

  • Two Versions of Same Source Control File (History/Roll Back) You can view code and content differences between two source control versions of the same file. This is useful if you need to roll back to an earlier version of a file. See Rolling Back to an Earlier Version of a File—Git.

    Example You have been working on translating a particular topic for a few days. Each day you pull the remote commits to your local database, make your changes, and commit and push the file back to the remote repository at the end of the day. At a certain point, you determine that you need to "roll back" to an earlier version of the file, using it to replace the latest version. Therefore, you use this feature to view the highlighted differences between the current version and an older version of the file. Once you have identified the older version that you want to use, you can retrieve that version.

  • Local Versus Source Control Version of a File You can view code and content differences between the local version of a file and the source control version of that file.

    Example You open a topic from source control and then make changes to some of the translations in your local copy of that file. You save your changes. Later that day, you want to revisit the new translations, but you cannot remember exactly which translations you added and which were there before. Therefore, you use this feature to highlight the text differences between your local version of the file and the version stored in the source control application. The new text is highlighted on the side displaying the local version of the file.

How to View Differences Between Two Versions of the Same Source Control File

  1. In the Source Control Explorer or File List, select the relevant file(s).
  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > View History.

    • Right-Click If you have the Source Control Explorer or File List open, right-click the file(s) you want to view and select Source Control > View History.
    • Local Toolbar In the File List, select the file(s) you want to view. In the local toolbar of the File List, click , then select View History .

    The History dialog opens.

  3. From the list, select the first file version that you want to compare.
  4. Hold the CTRL key and select the second file version from the list.
  5. Select Show Differences. The Differences Editor opens.

  6. (Optional) In the Differences Editor, use the buttons in the local toolbar to customize the information shown in the editor.
  7. When you are finished viewing the differences, close the window.

How to View Differences Between the Local and Source Control Versions of a File

  1. In the Source Control Explorer or File List, select the relevant file(s).
  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > Show Differences.

    • Right-Click If you have the Source Control Explorer or File List open, right-click the file(s) you want to view and select Source Control > Show Differences.
    • Local Toolbar In the File List, select the file(s) you want to view. In the local toolbar of the File List, click , then select Show Differences.

    The Differences Editor opens.

  3. (Optional) In the Differences Editor, use the buttons in the local toolbar to customize the information shown in the editor.
  4. When you are finished viewing the differences, close the window.

What’s Noteworthy?

Note When you modify a file in source control, you are actually modifying the file's corresponding XLF file. You will see the XLF file if you open the Source Control Explorer. This is because you need the XLF file available in order to make changes, view the file's history, or view differences.