JetBrains Fleet 1.34 Help

Commit and push changes to Git repository

After you've added new files to the local Git repository, or modified files that are already under Git version control and you are happy with their current state, you can share the results of your work. This involves committing them locally to record the snapshot of your repository to the project history, and then pushing them to the remote repository so that they become available to others.

Work with commits

Commit changes locally

  1. Open the Git tool or press ⌃ G,⌃ C.

    Git tab with a list of changed files and a window to write the commit message

    If you want to group the list of changed files by directory, click the Settings icon and select Group by | Directory.

    Group by Directory option in Git tool
  2. In the Changed files list, select the files you want to commit.

  3. Enter the commit message and click Commit.

You can use AI Assistant to help you generate commit messages.

Generate commit message

  • To generate a commit message for pending changes, select the changes to stage, then click the AI icon in the commit message field.

    Commit message generated by AI Assistant

AI Assistant can also help you understand the changes within a commit.

Explain commit

  • To explain the changes within a commit, right-click it in the Git History tool, then select Explain commit.

    Right-clicking a commit shows a context menu where you can choose to explain the commit

Amend commits

If you want to modify the latest commit, use the Amend Commit option.

  1. In the Git tool, select the modified files containing the changes you want to add to the previous commit.

  2. Click the Settings icon and select the Amend Commit option.

    Amend Commit option in the settings menu of the Git tool
  3. Modify the pre-filled commit message of the previous commit if necessary.

  4. Click the Amend commit button.

Push changes to a remote repository

Before pushing your changes, sync with the remote and make sure your local copy of the repository is up to date to avoid conflicts.

  1. From the main menu, choose Git | Push or press ⌃ G,⌃ P.

  2. In the Git Push dialog that opens, click Push.

  3. To push the changes to the remote branch, you now need to log in to your GitHub, GitLab, or Bitbucket account.

    • For GitLab and Bitbucket, enter your credentials and click Log in.

    • For GitHub, enter your personal access token and click Log in. If you do not have a token, follow the Generate link to generate a new personal access token in your GitHub settings.

      Log In to GitHub dialog

After the successful login Fleet pushes the local changes to the remote branch.

Last modified: 11 February 2024