← 返回命令列表

Linux command

hg-pull 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Pull from default remote

hg pull

Pull and update working directory

hg pull -u

Pull from specific source

hg pull [https://example.com/repo]

Pull specific revision

hg pull -r [revision]

Pull specific branch

hg pull -b [branch]

Pull from source and force even if unrelated

hg pull -f [https://example.com/repo]

说明

hg pull fetches changesets from a remote repository into the local repository. Unlike Git's pull, it does not automatically update the working directory. Use -u to update, or run hg update separately after pulling. The source defaults to the repository from which this repository was cloned.

参数

-u, --update
Update to new branch head after pulling.
-r, --rev _rev_
Pull specific revision.
-b, --branch _branch_
Pull specific branch.
-B, --bookmark _bookmark_
Pull a specific bookmark from the remote repository.
-f, --force
Pull even from unrelated repository.
--insecure
Do not verify server certificate (for HTTPS connections).

FAQ

What is the hg-pull command used for?

hg pull fetches changesets from a remote repository into the local repository. Unlike Git's pull, it does not automatically update the working directory. Use -u to update, or run hg update separately after pulling. The source defaults to the repository from which this repository was cloned.

How do I run a basic hg-pull example?

Run `hg pull` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -u, --update do in hg-pull?

Update to new branch head after pulling.