Pull changes from the remote repository
Update a shared project when remote changes are made to the project. Pull changes when the status bar displays
Remote changes available
. When you pull changes, the shared local project updates with changes made to the remote project. Any conflicts between the two versions of the project appear for you to choose which version of a change to keep. If another user of the shared project performs a Restore, a banner displays the message:
The remote project was restored to a previous state. Pull changes to synchronize your local workspace.
The Restore
option is disabled until you Pull
the changes. Change History
displays a warning that identifies the commits the other user removed with the Restore
.
IMPORTANT:
Pulled changes cannot be undone. Pull changes only if you want to make the shared project on the local computer the same as the project on the remote repository.
TIP:
The number in the icon identifies the total commits made by other users sharing the project (remote commits).
Prerequisite
- If you made changes to the local project, commit your changes before pulling remote commits. SelectCommit, and then selectPush.
To pull changes from the remote project
:- In the open project, ifRemote changes availableappears in the status bar, selectPullor selectFile > Source control > Pull. The open project updates with any changes made to the shared project on the remote repository.TIP: If the remote version of the shared project has changes to the same content as the local project version,Manage conflictsopens.
- IfManage conflictsopens, use:
- Statusto identify if the file contains conflicts.
- Pathto reference the files that have conflicts.
- Conflictsto identify the number of conflicts in a file andTotal conflictsto identify all the known conflicts.
- Select each conflict in the table and then select an option above the changed code for the conflict:
- Accept local change. Discard the change made to the remote version of the project and accept the change that appears in the LOCAL CHANGES row of code. This option updates the remote version of project with the change made to the local version of the project.
- Accept remote change. Discard the change made to the local version of the project and accept the change that appears in the SERVER CHANGES row of code. This option updates the local version of the project with the change made to the remote version of the project.
- Accept both changes. Apply the changes in both the LOCAL CHANGES and SERVER CHANGES rows of code.TIP: If another user deletes a file remotely from the shared project whileManage conflictsis open,Remote changes availableappears again.
- (optional) After you accept changes, theRevertbutton is enabled. SelectRevertif you want to return the files to the previously applied or committed changes.
- To manage any remotely removed files, selectPullagain and then in the firstKeep filecolumn ofManage conflicts, either:
- Select the checkbox to keep the file that the other user removed remotely.
- Leave the checkbox cleared to remove the file from your local project as well.
- When all conflicts are resolved, selectAccept.
Provide Feedback