Next: Merging Branches, Previous: Switching between Branches, Up: Version Control Branches [Contents][Index]
With a decentralized version control system, update another repository with locally-committed changes from the current branch (a.k.a. push changes). This concept does not exist for centralized version control systems
With a decentralized version control system, update the current branch of the local repository by pulling in changes from another repository.
With a centralized version control system, update the current VC fileset from the repository.
On a decentralized version control system, the command C-x v P
(vc-push
) updates another location, commonly known as the
upstream repository, with locally-committed changes from the
current branch. With a prefix argument, it prompts for the exact
version control command to run, which lets you specify where to push
changes; the default is bzr push with Bazaar, git push
with Git, and hg push with Mercurial. The default commands
always push to the repository in the default location determined by
the version control system from your branch configuration.
Prior to pushing, you can use C-x v O (vc-log-outgoing
)
to view a log buffer of the changes to be sent upstream. See VC Change Log.
This command is currently supported only by Bazaar, Git, and Mercurial. The concept of “pushing” does not exist for centralized version control systems, where this operation is a part of committing a changeset, so invoking this command on a centralized VCS signals an error. This command also signals an error when attempted in a Bazaar bound branch, where committing a changeset automatically pushes the changes to the remote repository to which the local branch is bound.
With a decentralized version control system, the command C-x v
+ (vc-pull
) updates the current branch of the local repository
and it working tree with changes made in the upstream repository. It
is typically used to update a copy (a.k.a. clone) of a remote
branch. If you supply a prefix argument, the command prompts for the
exact version control command to use, which lets you specify where to
pull changes from. Otherwise, it pulls from the repository in the
default location determined by the version control system from your
branch configuration.
Amongst decentralized version control systems, C-x v + is currently supported only by Bazaar, Git, and Mercurial. With Bazaar, it calls bzr pull for ordinary branches (to pull from a master branch into a mirroring branch), and bzr update for a bound branch (to pull from a central repository). With Git, it calls git pull to fetch changes from a remote repository and merge it into the current branch. With Mercurial, it calls hg pull -u to fetch changesets from the default remote repository and update the working directory.
Prior to pulling, you can use C-x v I (vc-log-incoming
)
to view a log buffer of the changes to be applied. See VC Change Log.
With a centralized version control system like CVS, C-x v + updates the current VC fileset from the repository.
Next: Merging Branches, Previous: Switching between Branches, Up: Version Control Branches [Contents][Index]