Fetching from remote repositories

There are three basic ways to fetch your changes from the remote repository;

To be sure that you fetch properly, check that all the GIT configurations were properly specified.

Fetching with the Fetch wizard

Fetch wizard is the most powerful way to get changes from a remote repository.

Step 0. To be able to fetch from a remote repository, you need its URL.

If you want to fetch to a completely new (= perfectly empty) repository created in the GIT Repositories view, you have to follow this procedure:

  1. Create a folder which will serve as your local repository.
  2. Fetch from the remote repository (from the GIT Repositories view).
  3. Initialize the repository structure (from the GIT Repositories view).
  4. Merge or rebase your branches.

Fetch Ref Specifications

To fetch from the remote repository, you have to define how your local branches and tags refer to remote ones (= specify references).

Add create/update specification specifies what local branch you want to map with what remote branch:

Source and destination branches are chosen among the existing ones from the drop-down lists:

Add Spec button sends the newly defined specification to the list of Specifications for fetch:

Add predefined specification incorporates predefined specifications:

Add All Branches Spec declares that you want to map your local branch names to the same branch names on the repository you are pushing to.

Add All Tags Spec declares that you want to map your local tags one-by-one to the same tags on the repository you are pushing to.

Specifications for fetch contains all the mappings to be fetched:

If you add multiple Fetch Ref Specifications and they are in conflict, they will be colored in red. To solve such conflicts, you have to remove or edit the conflicting specs:

If you check Force update for a specification or press Force Update All Specs, you declare that in the case of the conflict new commits with overwrite the previous ones.

By clicking the dustbin icon or pressing Remove All Specs , you remove the newly created specifications from the Specifications for fetch list (all of them or one by one):

Annotated tags fetching strategy specifies what the Fetch wizard will do to annotated tags:

Fetching from Upstream

Typically, local branches fully correspond to the remote ones, and these remote branches contain all the information necessary to access the remote repository.

If so, you can configure Fetch in such a way that your local branches will be linked with the corresponding branches of the remote repository, and you will be able to fetch without specifying fetch refs (e.g. your local develop commits will be automatically pushed to your remote develop) - by fetching from upstream.

Fetching directly

Once your have configured Fetch, you can commit you changes to the local repository directly (from the GIT Repositories view):

Step 1. Open the GIT perspective as described here.

Both when Fetching from upstream and fetching directly, you can configure Fetch by pressing Configure and going to the Fetch Configuration dialog:

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.