Synchronizing Your Local Clone with the Upstream Repository
While you work on your fork, other team members may contribute changes to the blessed repository, unless you are working alone. Long diverging histories increase the likelihood of merge conflicts, so we recommend pulling changes from the blessed repository regularly.
Synchronizing with the Upstream using Git
Set up a remote pointing to the upstream repository. You are required to do this only once, issuing the following commands in the root directory of the local clone of your fork.
git remote add <name-of-the-remote> <clone-url-of-the-upstream-repository>
If you are not sure whether you have already set up the remote, you can easily list the existing remotes:
git remote
When you have the remote in place, you can pull in all changes from the upstream repository executing this any time:
git pull <name-of-the-remote> master
After executing this pull command, your local developer private is in sync with blessed again.
Synchronizing with the Upstream using Mercurial
Set up a symbolic name to point to the upstream repository. This is a one-time task that you can complete by editing the paths section in the hgrc configuration file. For more information, see"paths" section in the "hgrc" configuration file.
Launch the editor :
vim /path/to/your/local/clone/.hg/hgrc
Append a line to the paths section with the symbolic name such as:
[paths]

default = ssh://[email protected]/hg/hgtest-james

hgtest-blessed = ssh://[email protected]/hg/hgtest-blessed

If you want to check if this new name is picked up correctly by Mercurial, or you are not sure whether you already created the symbolic name before, you can list the already configured paths at any instant by:
hg paths
If you registered the symbolic name, it is easier to pull in changes as you can enter the symbolic name instead of the URL of the repository:
hg pull -u hgtest-blessed
After this your clone is synchronized with the blessed repository.
Was this helpful?