Viewing Differences in Source Control Files—Git

One of the benefits of Flare'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 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 modify a procedure topic from source control and then add some lines of text to your local copy of that topic file. You save your changes. Later that day, you want to revisit the new content that you wrote, but you cannot remember exactly which lines of text you added. Therefore, you use this feature to highlight the text differences between your local version of the file and the version stored in source control. The new lines of text are 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 one of the window panes (e.g., Content Explorer, Source Control Explorer, File List, Project Organizer, Pending Changes window pane), 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 Content Explorer, Project Organizer, Source Control Explorer, Pending Changes window pane, or File List open, right-click the file(s) you want to view and select Source Control > 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 Version of a File and the Source Control Version

  1. In one of the window panes (e.g., Content Explorer, Source Control Explorer, File List, Project Organizer, Pending Changes window pane), 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 Content Explorer, Project Organizer, Source Control Explorer, Pending Changes window pane, or File List open, right-click the file(s) you want to view and select Source Control > 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.