Git Commits

This guide goes over the commit tab of the Git Modal and making a commits to your repository.

Commits

When you open the Git Modal, it will show any changes made and automatically select all files to be staged. You'll need to deselect any files you don't want.

The commit tab of the Git Modal

The commit tab of the Git Modal


  1. Git Modal Header - The header will always show the Current Branch, the Current Commit and if there are any uncommitted changes. It will also indicate if you are on the Commit or Branches screen.
  2. Changes - Changes shows any changes that were made to the current branch. Each one shows the number of files modified. Click each file to see the changes made. Learn more in What Gets Committed.
  3. Manage Changes:
    1. Stage All - All files under changes are selected to be part of the next commit.
    2. Unstage All - No files are selected to be part of the next commit. You’ll need to select the files you want to commit. At least one file needs to be selected to make a commit.
    3. Discard All - Discard all changes that were made to the Workspace.
  4. File Differences - Changes in red are deletions and changes in green are additions.
    4. Previous will show the contents before changes were made.
    5. Current will show the contents after changes were made, or what the file looks like currently. See Viewing File Differences for an example.
  5. Commit Message - A commit message describes the changes that were made.
  6. Fetch - Fetch gets all changes from the repository. Including any changes made to the branch you are working on.

Viewing File Differences

To view changes to a specific file, click on it, and the two panes on the right will populate with the file's previous state in the left pane and its current state in the right pane. Scrolling through the file will show you patches of green and red, which denote where additions and deletions have occurred. In the following example, a LOWER() transformation was applied and the column N_COMMENT was deleted without a replacement.

Viewing commit file differences

Viewing commit file differences


Making a Commit

  1. Select the files you want to Stage. If you need to make changes, you’ll need to make them in the Workspace. At least one file needs to be selected.
  2. Write your Commit Message. It should be short and descriptive.
  3. Commit and Push your changes.

If you have no more changes to display, the list on the left won’t have any files. If you didn't commit all files, the list will be reduced to show just those files. This will allow you to make multiple commits within one use of the Git Modal, following the same process outlined above.

Understanding the Commits

Commit Init commit (4e9ae5d1) is available in both the jobs-testing branch and main branch. The branch jobs-testing was created from the main branch at commit 4e9ae5d1 . That means jobs-testing contains any changes made in the main branch at the commit snapshot 4e9ae5d1.