Linux command
hg-root 命令
文本
Copy it and replace filenames, paths, or keywords as needed.
命令示例
Show repository root
hg root
Use in scripts
cd $(hg root)
说明
hg root prints the root directory of the Mercurial repository. It outputs the absolute path to the .hg directory's parent. The command is useful in scripts to locate the repository root regardless of current working directory. It fails if not in a repository.
参数
- --help
- Display help information.
FAQ
What is the hg-root command used for?
hg root prints the root directory of the Mercurial repository. It outputs the absolute path to the .hg directory's parent. The command is useful in scripts to locate the repository root regardless of current working directory. It fails if not in a repository.
How do I run a basic hg-root example?
Run `hg root` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --help do in hg-root?
Display help information.