Forrest logo
tool overview
On this page you find all important commands for the CLI tool hg. If the command you are looking for is missing please ask our AI.

hg

Hg, also known as Mercurial, is a distributed version control system (DVCS) used for software development. It was created for efficiency and simplicity, aiming to provide an easy-to-use tool for managing projects. Here are ten key points about Hg:

  1. Hg is written in Python, making it easily extendable and platform-independent, supporting Windows, macOS, and Linux.
  2. It uses a decentralized model, where each developer has a complete local copy of the repository, enabling offline work and faster operations.
  3. Hg boasts a powerful branching and merging system, allowing developers to easily switch between different branches and merge code changes efficiently.
  4. It supports both centralized and decentralized workflows, making it suitable for solo projects or distributed teams collaborating on large-scale projects.
  5. Hg provides an intuitive and user-friendly interface, making it easier for beginners to grasp and use effectively.
  6. It offers robust support for handling binary files and large repositories, ensuring smooth performance even with complex projects.
  7. Hg embraces a simple and unified model for tracking changes, with commits representing a snapshot of the entire project directory at a given point in time.
  8. It includes features like built-in web server, integrated bug tracker support, and extensions that enhance its functionality and integrations with other tools.
  9. Hg guarantees data integrity using SHA-1 hashes to identify each revision and enabling detection of any tampering or corruption.
  10. It offers seamless integration with popular IDEs like Visual Studio Code, PyCharm, and Eclipse, augmenting the development workflow with version control capabilities.

Overall, Hg's emphasis on simplicity, speed, and ease of use has made it a popular choice among individuals and teams for managing software projects effectively.

List of commands for hg:

  • hg-add:tldr:05778 hg-add: Add files or directories to the staging area.
    $ hg add ${filename}
    try on your machine
    explain this command
  • hg-add:tldr:4b638 hg-add: Recursively add sub-repositories.
    $ hg add --subrepos
    try on your machine
    explain this command
  • hg-add:tldr:51be1 hg-add: Add all unstaged files, excluding those that match a specified pattern.
    $ hg add --exclude ${pattern}
    try on your machine
    explain this command
  • hg-add:tldr:b329f hg-add: Add all unstaged files matching a specified pattern.
    $ hg add --include ${pattern}
    try on your machine
    explain this command
  • hg-add:tldr:e3711 hg-add: Perform a test-run without performing any actions.
    $ hg add --dry-run
    try on your machine
    explain this command
  • hg-branch:tldr:82194 hg-branch: Show the name of the currently active branch.
    $ hg branch
    try on your machine
    explain this command
  • hg-branch:tldr:a3198 hg-branch: Create a new branch for the next commit.
    $ hg branch ${branch_name}
    try on your machine
    explain this command
  • hg-clone:tldr:13631 hg-clone: Clone a repository with only the `.hg` directory, without checking out files.
    $ hg clone --noupdate ${remote_repository_source}
    try on your machine
    explain this command
  • hg-clone:tldr:40eed hg-clone: Clone a repository to a specified directory.
    $ hg clone ${remote_repository_source} ${destination_path}
    try on your machine
    explain this command
  • hg-clone:tldr:93cde hg-clone: Clone a repository to a specific revision, tag or branch, keeping the entire history.
    $ hg clone --updaterev ${revision} ${remote_repository_source}
    try on your machine
    explain this command
  • hg-clone:tldr:a1adc hg-clone: Clone a repository to the head of a specific branch, ignoring later commits.
    $ hg clone --branch ${branch} ${remote_repository_source}
    try on your machine
    explain this command
  • hg-clone:tldr:a273d hg-clone: Clone a repository up to a specific revision without any newer history.
    $ hg clone --rev ${revision} ${remote_repository_source}
    try on your machine
    explain this command
  • hg-commit:tldr:24c0c hg-commit: Commit all files, excluding those that match a specified pattern.
    $ hg commit --exclude ${pattern}
    try on your machine
    explain this command
  • hg-commit:tldr:54115 hg-commit: Commit using the interactive mode.
    $ hg commit --interactive
    try on your machine
    explain this command
  • hg-commit:tldr:9089a hg-commit: Commit with a specific message.
    $ hg commit --message ${message}
    try on your machine
    explain this command
  • hg-commit:tldr:9ffba hg-commit: Commit staged files to the repository.
    $ hg commit
    try on your machine
    explain this command
  • hg-commit:tldr:b8420 hg-commit: Commit a specific file or directory.
    $ hg commit ${filename_or_directory}
    try on your machine
    explain this command
  • hg-commit:tldr:ea405 hg-commit: Commit all files matching a specified pattern.
    $ hg commit --include ${pattern}
    try on your machine
    explain this command
  • hg-init:tldr:19c32 hg-init: Initialize a new repository in the current directory.
    $ hg init
    try on your machine
    explain this command
  • hg-init:tldr:978af hg-init: Initialize a new repository in the specified directory.
    $ hg init ${path-to-directory}
    try on your machine
    explain this command
  • hg-log:tldr:0f169 hg-log: Display the entire revision history of the repository.
    $ hg log
    try on your machine
    explain this command
  • hg-log:tldr:15721 hg-log: Display the revision history for a specific date.
    $ hg log --date ${date}
    try on your machine
    explain this command
  • hg-log:tldr:2a86a hg-log: Display the revision history with an ASCII graph.
    $ hg log --graph
    try on your machine
    explain this command
  • hg-log:tldr:469d5 hg-log: Display the revision history with file names matching a specified pattern.
    $ hg log --include ${pattern}
    try on your machine
    explain this command
  • hg-log:tldr:49724 hg-log: Display revisions committed by a specific user.
    $ hg log --user ${user}
    try on your machine
    explain this command
  • hg-log:tldr:5e26c hg-log: Display the revision history for a specific branch.
    $ hg log --branch ${branch}
    try on your machine
    explain this command
  • hg-log:tldr:ec231 hg-log: Display the revision history, excluding file names that match a specified pattern.
    $ hg log --exclude ${pattern}
    try on your machine
    explain this command
  • hg-log:tldr:fad39 hg-log: Display the log information for a specific revision.
    $ hg log --rev ${revision}
    try on your machine
    explain this command
  • hg-pull:tldr:0d3c7 hg-pull: Specify a specific bookmark to pull.
    $ hg pull --bookmark ${bookmark}
    try on your machine
    explain this command
  • hg-pull:tldr:12855 hg-pull: Pull changes even when the remote repository is unrelated.
    $ hg pull --force
    try on your machine
    explain this command
  • hg-pull:tldr:3cf72 hg-pull: Update the local repository to the head of the remote.
    $ hg pull --update
    try on your machine
    explain this command
  • hg-pull:tldr:41582 hg-pull: Specify a specific branch to pull.
    $ hg pull --branch ${branch}
    try on your machine
    explain this command
  • hg-pull:tldr:440ef hg-pull: Specify a specific revision changeset to pull up to.
    $ hg pull --rev ${revision}
    try on your machine
    explain this command
  • hg-pull:tldr:78c77 hg-pull: Pull from a specified source repository.
    $ hg pull ${path-to-source_repository}
    try on your machine
    explain this command
  • hg-pull:tldr:c6cd2 hg-pull: Pull from the "default" source path.
    $ hg pull
    try on your machine
    explain this command
  • hg-push:tldr:15b9f hg-push: Push changes to the "default" remote path.
    $ hg push
    try on your machine
    explain this command
  • hg-push:tldr:21615 hg-push: Specify a specific branch to push.
    $ hg push --branch ${branch}
    try on your machine
    explain this command
  • hg-push:tldr:a2741 hg-push: Specify a specific bookmark to push.
    $ hg push --bookmark ${bookmark}
    try on your machine
    explain this command
  • hg-push:tldr:ac976 hg-push: Push a new branch if it does not exist (disabled by default).
    $ hg push --new-branch
    try on your machine
    explain this command
  • hg-push:tldr:d79b7 hg-push: Specify a specific revision changeset to push.
    $ hg push --rev ${revision}
    try on your machine
    explain this command
  • hg-push:tldr:f7a8c hg-push: Push changes to a specified remote repository.
    $ hg push ${path-to-destination_repository}
    try on your machine
    explain this command
  • hg-remove:tldr:02f6f hg-remove: Remove all staged files matching a specified pattern.
    $ hg remove --include ${pattern}
    try on your machine
    explain this command
  • hg-remove:tldr:07504 hg-remove: Remove files from the repository that have been physically removed.
    $ hg remove --after
    try on your machine
    explain this command
  • hg-remove:tldr:3ea3a hg-remove: Remove all staged files, excluding those that match a specified pattern.
    $ hg remove --exclude ${pattern}
    try on your machine
    explain this command
  • hg-remove:tldr:6c8e3 hg-remove: Recursively remove sub-repositories.
    $ hg remove --subrepos
    try on your machine
    explain this command
  • hg-remove:tldr:d0f42 hg-remove: Remove files or directories from the staging area.
    $ hg remove ${filename}
    try on your machine
    explain this command
  • hg-root:tldr:056e3 hg-root: Display the root location of the specified repository.
    $ hg root --cwd ${path-to-directory}
    try on your machine
    explain this command
  • hg-root:tldr:46f3f hg-root: Display the root location of the current repository.
    $ hg root
    try on your machine
    explain this command
  • hg-serve:tldr:a1750 hg-serve: Start a web server instance.
    $ hg serve
    try on your machine
    explain this command
  • hg-serve:tldr:ad376 hg-serve: Start a web server instance using the specified SSL certificate bundle.
    $ hg serve --certificate ${path-to-certificate}
    try on your machine
    explain this command
  • hg-serve:tldr:b0a40 hg-serve: Start a web server instance on the specified port.
    $ hg serve --port ${port}
    try on your machine
    explain this command
  • hg-serve:tldr:b6b42 hg-serve: Start a web server instance on the specified listening address.
    $ hg serve --address ${address}
    try on your machine
    explain this command
  • hg-serve:tldr:c2fb1 hg-serve: Start a web server instance using the specified theme (see the templates directory).
    $ hg serve --style ${style}
    try on your machine
    explain this command
  • hg-serve:tldr:d0262 hg-serve: Start a web server instance with a specific identifier.
    $ hg serve --name ${name}
    try on your machine
    explain this command
  • hg-status:tldr:02ced hg-status: Display only modified files.
    $ hg status --modified
    try on your machine
    explain this command
  • hg-status:tldr:27135 hg-status: Display the status of changed files.
    $ hg status
    try on your machine
    explain this command
  • hg-status:tldr:7e478 hg-status: Display only deleted (but tracked) files.
    $ hg status --deleted
    try on your machine
    explain this command
  • hg-status:tldr:9d107 hg-status: Display changes in the working directory compared to a specified changeset.
    $ hg status --rev ${revision}
    try on your machine
    explain this command
  • hg-status:tldr:a4505 hg-status: Display only files matching a specified glob pattern.
    $ hg status --include ${pattern}
    try on your machine
    explain this command
  • hg-status:tldr:d3c85 hg-status: Display only added files.
    $ hg status --added
    try on your machine
    explain this command
  • hg-status:tldr:da82f hg-status: Display only removed files.
    $ hg status --removed
    try on your machine
    explain this command
  • hg-status:tldr:ebffc hg-status: Display files, excluding those that match a specified glob pattern.
    $ hg status --exclude ${pattern}
    try on your machine
    explain this command
  • hg-update:tldr:00556 hg-update: Update to the last commit matching a specified date.
    $ hg update --date ${dd-mm-yyyy}
    try on your machine
    explain this command
  • hg-update:tldr:32c42 hg-update: Update and discard uncommitted changes.
    $ hg update --clean
    try on your machine
    explain this command
  • hg-update:tldr:c9135 hg-update: Update to the tip of the current branch.
    $ hg update
    try on your machine
    explain this command
  • hg-update:tldr:dbcb2 hg-update: Update to the specified revision.
    $ hg update --rev ${revision}
    try on your machine
    explain this command
  • hg:tldr:17da4 hg: Execute Mercurial command.
    $ hg ${command}
    try on your machine
    explain this command
  • hg:tldr:410b4 hg: Check the Mercurial version.
    $ hg --version
    try on your machine
    explain this command
  • hg:tldr:d1893 hg: Call help on a command.
    $ hg help ${command}
    try on your machine
    explain this command
  • hg:tldr:d4923 hg: Call general help.
    $ hg help
    try on your machine
    explain this command
tool overview