Pulling changes from a remote repository

As you work in a team, your team members will also be making changes to the remote repository. When you want to get the changes done in the remote repository to your local repository, you use the Pull option. But before you perform the Pull operation, you need to configure it.

In Package Explorer, right-click on the project and select Team | Remote | Configure Fetch from Upstream...:

Figure 3.31: Configuring Git Fetch
In Git, both Pull and Fetch can get the changes from a remote repository. However, the Fetch operation does not merge the changes in the local repository. The Pull operation first fetches the changes and then merges in the local repository. If you want to inspect the files before you merge, then select the Fetch option.

We need to map the local master branch with a branch in the remote repository. This tells the Pull operation to fetch the changes from the branch in the remote repository and merge it in the given (in this case, master) local repository. Click the Add... button:

Figure 3.32: Configuring Git Fetch

Start typing the name of the branch in the source textbox and the wizard will get the branch information from the remote repository and auto complete it. Click Next and then Finish. This takes you back to the Configure Fetch page with mapping of the branches added to it:

Figure 3.33: Configuring Git Fetch with mapping added

Click Save and Fetch to pull the changes from the remote repository.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.31.67