Linux command
hg 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize repository
hg init
Clone repository
hg clone [url]
Show status
hg status
Add files
hg add [files]
Commit changes
hg commit -m "[message]"
View log
hg log
Pull changes
hg pull
Push changes
hg push
说明
Mercurial (hg) is a distributed version control system. It tracks changes in source code and supports branching, merging, and collaboration. Mercurial is similar to Git but with different command syntax and philosophy. It emphasizes simplicity and consistency in its interface.
参数
- init
- Create repository.
- clone
- Clone repository.
- status
- Show working directory status.
- add
- Add files.
- commit
- Commit changes.
- log
- Show history.
- pull
- Pull from remote.
- push
- Push to remote.
- --help
- Display help information.
FAQ
What is the hg command used for?
Mercurial (hg) is a distributed version control system. It tracks changes in source code and supports branching, merging, and collaboration. Mercurial is similar to Git but with different command syntax and philosophy. It emphasizes simplicity and consistency in its interface.
How do I run a basic hg example?
Run `hg init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init do in hg?
Create repository.