JetBrains Fleet 1.42 Help

Sync with a remote Git repository (fetch, pull, sync)

Before you can share the results of your work by pushing your changes to the upstream, you need to synchronize with the remote repository to make sure your local copy of the project is up to date. You can do this in one of the following ways: fetch or pull changes, as well as sync the local project with the remote.

Fetch changes

When you fetch changes from the upstream, all new data from commits that were made since you last synced with the remote repository is downloaded into your local copy. This new data is not integrated into your local files, and changes are not applied to your code.

Fetched changes are stored as a remote branch, which gives you a chance to review them before you merge them with your files. Since fetch does not affect your local development environment, this is a safe way to get an update of all changes to a remote repository.

There are two ways to fetch changes from the upstream:

  • Select Git | Fetch from the main menu.

  • Alternatively, in the Branches menu, click the name of the branch that is currently checked out, then choose Remote Branches | Fetch.

    Fetch option in the branches menu

    Pull

    If you need to get changes into the current branch from the remote tracked branch, use pull.

    Before performing git pull, Fleet automatically saves your uncommitted changes by stashing them.

    To pull changes into the local branch from the remote tracked branch:

    1. Check out the branch you want to update by clicking its name in the Branches menu.

    2. Choose Git | Pull in the main menu or Press ⌃ G,⌃ U.

    Sync

    The Unsynced commits tab is a part of the Git tool. It helps you synchronize the local branch with the remote tracked branch.

    Unsynced commits tab

    After you perform the fetch operation, this tab will indicate if there are any unsynchronized commits between your local branch and the remote tracked branch.

    To synchronize the changes between your local branch and the remote tracked branch:

    1. In the Unsynced commits tab, click Sync.

    2. In the Git Sync dialog that opens, confirm the operation by choosing Sync.

    First, Fleet pushes local changes to the remote tracked branch. Then, if the remote branch also contains unsynchronized commits, Fleet pulls them into the local branch.

    Last modified: 11 February 2024