GIT vs HG
git
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info -path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] [-c name=value] [--help] <command> [<args>]
commands:
add Add file contents to the index bisect Find by binary search the change that introduced a bug branch List, create, or delete branches checkout Checkout a branch or paths to the working tree clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, commit and working tree, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories together mv Move or rename a file, a directory, or a symlink pull Fetch from and merge with another repository or a local branch push Update remote refs along with associated objects rebase Forward-port local commits to the updated upstream head reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index show Show various types of objects status Show the working tree status tag Create, list, delete or verify a tag object signed with GPG
hg
commands:
add add the specified files on the next commit annotate show changeset information by line for each file clone make a copy of an existing repository commit commit the specified files or all outstanding changes diff diff repository (or selected files) export dump the header and diffs for one or more changesets forget forget the specified files on the next commit init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision pull pull changes from the specified source push push changes to the specified destination qdiff diff of the current patch and subsequent modifications qnew create a new patch qpop pop the current patch off the stack qpush push the next patch onto the stack qrefresh update the current patch remove remove the specified files on the next commit serve start stand-alone webserver status show changed files in the working directory summary summarize working directory state update update working directory (or switch revisions)
commands
git/Hg | git | hg |
init/init | Create an empty git repository or reinitialize an existing one | create a new repository in the given directory |
clone/clone | Clone a repository into a new directory | make a copy of an existing repository |
add/add | Add file contents to the index | add the specified files on the next commit |
commit/commit | Record changes to the repository | commit the specified files or all outstanding changes |
pull/pull | Fetch from and merge with another repository or a local branch | pull changes from the specified source |
push/push | Update remote refs along with associated objects | push changes to the specified destination |
checkout/update | Checkout a branch or paths to the working tree | update working directory (or switch revisions) |
status/status | Show the working tree status | show changed files in the working directory |
log/log | Show commit logs | show revision history of entire repository or files |