Next: ブランチのマージ, Previous: ブランチ間の切り替え, Up: バージョンコントロールのブランチ [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.
現在のところ、このコマンドはBazaar、Git、Mercurialだけでサポートされます。“push”という概念は集中型のバージョンコントロールシステムには存在しません。なぜなら、この操作は変更セットのコミットの一部なので、集中型のVCSでこのコマンドを呼び出すと、エラーをシグナルします。Bazaarのbound branchでこのコマンドを試みたときもエラーをシグナルします。変更セットのコミットは、自動的に変更を(ローカルのブランチがバインドされている)リモートのレポジトリにpushするからです。
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.
分散型のバージョンコントロールシステムの中で、現在C-x v +がサポートするのはBazaar、Git、Mercurialだけです。Bazaarでは、これは通常のブランチにたいしては、(マスターブランチをミラーリングされたブランチにpullするために) bzr pullを呼び出し、バインドされたブランチにたいしては、(中心となるレポジトリからpullするために) bzr updateを呼び出します。Gitでは、これはリモートのレポジトリから変更を取得して、それをカレントブランチにマージするためにgit pullを呼び出します。Mercurialでは、デフォルトのリモートレポジトリから変更を取得して、作業ディレクトリーを更新するためにhg pull -uを呼び出します。
pullする前にC-x v I
(vc-log-incoming
)を使用して、適用される変更のlogバッファーを閲覧できます。VC Change Logを参照してください。
With a centralized version control system like CVS, C-x v + updates the current VC fileset from the repository.
Next: ブランチのマージ, Previous: ブランチ間の切り替え, Up: バージョンコントロールのブランチ [Contents][Index]