Hg Command Line Reference - Version Control Guide

Learn essential Hg (Mercurial) commands for version control. Clone, add, commit, push, and pull with this quick reference guide for developers.

Hg Version Control Commands

Mercurial (Hg) is a distributed version control system. This guide provides essential command-line operations for managing your code repositories.

Basic Hg Operations

These commands cover the fundamental actions you'll perform with Mercurial.

---
tags: [ vcs ]
---
# To clone a directory:
hg clone

# To add files to hg tracker:
hg add <file>

# To add all files in <dir> to hg tracker:
hg add <dir>

# To create a commit with all tracked changes and a message:
hg commit -m <message>

# To push commits to source repository:
hg push

# To pull changes from source repository:
hg pull

# To rebase local commits to disambiguate with remote repository:
hg pull --rebase

Advanced Hg Usage

Explore more advanced commands for efficient version control workflows.

Hg Workflow Essentials

Understand the core concepts and commands for a smooth development process.

Mercurial Command Reference

A comprehensive list of commonly used Mercurial commands for developers.