Skip to content

Git compare

Compare changes allows you to compare the local changes in a file with the previous commit. This is useful if you have made lots of changes to a file in your local branch, and want to easily check how they compare to the previous commit. You can compare changes that have been made to pipelines and text-based files.


Compare changes from the branch menu

Follow the steps below to compare your changes to the previous commit:

  1. Click the branch menu on the project bar.
  2. Click Compare changes in the drop-down menu. The Compare changes dialog will open. The header shows the author, timestamp and commit message of the previous commit.
  3. In the Files column, select the file you want to compare. The type of change made to each file is indicated by a letter:
    • N means that the file is new
    • M means that the file has been modified
    • D means that the file has been deleted
  4. The file you select will be displayed to the right of the Files column. You can click the arrow icon to show or hide the Files column, and you can use the toggle in the top right to turn Unified view on or off to suit your preference.

    Note

    Red highlights show where content has been removed or replaced. Green highlights show where content has been added or replaced the previous content. The scroll bar on the right shows where changes have been made in the file.

  5. Once you have finished viewing the changes, click Close to close the dialog and return to the pipeline canvas.


Compare changes when making a commit

You can also compare the local changes you have made with the last commit when committing your changes. To do this, follow these steps:

  1. Click the branch menu on the project bar.
  2. Click Commit in the branch menu on the project bar. The Commit changes dialog will open.
  3. Click the Compare changes icon for the file you want to compare. The Compare changes dialog will open, with the file pre-selected.