There are three basic ways to fetch your changes from the remote repository;
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.
For security reasons, you may uncheck the Store in Secure Store box, but in this case you'll have to enter the user name and password every time when fetching:
Once you have already fetched from the repository (or pushed to it), you'll be able to select it from the drop-down list (after pressing Ctrl + Space) or type the URL in directly :
Once you have configured Fetch from the GIT Repositories view, you will be able to select it from the drop-down list of Configured remote repositories:
Fetch Ref Specifications window is described below .
For ref updates, you get the details of the fetched changes (as above);
for refs which are deleted, you get [deleted]:
for refs which not exist yet, you get [new branch] or [new tag]:
for refs which contain now updates, you get [up to date]:
To go on working with your projects, you have to merge or rebase your branches and import the projects to your workspace:
If you want to fetch to a completely new (= perfectly empty) repository created in the GIT Repositories view, you have to follow this procedure:
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:
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.
To go on working with your projects, you have to merge or rebase your branches and import the projects to your workspace.
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.
To go on working with your projects, you have to merge or rebase your branches and import the projects to your workspace.
Both when Fetching from upstream and fetching directly, you can configure Fetch by pressing Configure and going to the Fetch Configuration dialog: