Linux command
hg-update 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Update to tip
hg update
Update to specific revision
hg update -r [revision]
Update to branch
hg update [branch-name]
Update to tag
hg update [tag-name]
Clean update discarding changes
hg update -C
Check for uncommitted changes first
hg update -c [revision]
说明
hg update (alias: up, checkout, co) updates the working directory to a specific revision. Without arguments, updates to the tip of the current branch. Can update to revisions, branches, tags, or bookmarks. Use -C to discard local changes or -c to abort if changes exist.
参数
- -r, --rev _rev_
- Revision to update to.
- -C, --clean
- Discard uncommitted changes.
- -c, --check
- Abort if uncommitted changes exist.
- -m, --merge
- Merge uncommitted changes.
- -d, --date _date_
- Tipmost revision matching date.
FAQ
What is the hg-update command used for?
hg update (alias: up, checkout, co) updates the working directory to a specific revision. Without arguments, updates to the tip of the current branch. Can update to revisions, branches, tags, or bookmarks. Use -C to discard local changes or -c to abort if changes exist.
How do I run a basic hg-update example?
Run `hg update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -r, --rev _rev_ do in hg-update?
Revision to update to.