2010-08-30 07:48:17 +04:00
|
|
|
$ hg init
|
|
|
|
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Ama
|
|
|
|
adding a
|
|
|
|
|
|
|
|
$ hg an a
|
|
|
|
0: a
|
|
|
|
|
2012-05-06 18:58:04 +04:00
|
|
|
$ hg --config ui.strict=False an a
|
|
|
|
0: a
|
|
|
|
|
2010-08-30 07:48:17 +04:00
|
|
|
$ echo "[ui]" >> $HGRCPATH
|
|
|
|
$ echo "strict=True" >> $HGRCPATH
|
|
|
|
|
|
|
|
$ hg an a
|
|
|
|
hg: unknown command 'an'
|
|
|
|
Mercurial Distributed SCM
|
|
|
|
|
2018-10-15 19:35:15 +03:00
|
|
|
hg COMMAND [OPTIONS]
|
|
|
|
|
|
|
|
These are some common Mercurial commands. Use 'hg help commands' to list all
|
|
|
|
commands, and 'hg help COMMAND' to get help on a specific command.
|
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
Get the latest commits from the server:
|
2010-08-30 07:48:17 +04:00
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
pull pull changes from the specified source
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
View commits:
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
show show commit in detail
|
|
|
|
diff show differences between commits
|
|
|
|
|
|
|
|
Check out a commit:
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-11-08 06:57:38 +03:00
|
|
|
checkout check out a specific commit
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
Work with your checkout:
|
|
|
|
|
2018-11-08 06:57:38 +03:00
|
|
|
status list files with pending changes
|
|
|
|
add start tracking the specified files
|
|
|
|
remove delete the specified tracked files
|
|
|
|
forget stop tracking the specified files
|
|
|
|
revert change the specified files to match a commit
|
2018-10-15 19:35:15 +03:00
|
|
|
|
|
|
|
Commit changes and modify commits:
|
|
|
|
|
2018-11-08 06:57:38 +03:00
|
|
|
commit save all pending changes or specified files in a new commit
|
2018-10-15 19:35:15 +03:00
|
|
|
|
|
|
|
Rearrange commits:
|
|
|
|
|
2018-10-15 19:35:15 +03:00
|
|
|
graft copy commits from a different location
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-10-30 17:58:06 +03:00
|
|
|
Undo changes:
|
|
|
|
|
|
|
|
uncommit uncommit part or all of the current commit
|
|
|
|
|
2018-10-17 19:56:04 +03:00
|
|
|
Other commands:
|
2018-10-15 19:35:15 +03:00
|
|
|
|
2018-11-08 06:57:38 +03:00
|
|
|
config show config settings
|
2018-10-26 00:42:34 +03:00
|
|
|
grep search for a pattern in tracked files in the working directory
|
2018-10-15 19:35:15 +03:00
|
|
|
|
|
|
|
Additional help topics:
|
|
|
|
|
2018-11-08 06:57:38 +03:00
|
|
|
filesets specifying files by their characteristics
|
|
|
|
glossary common terms
|
|
|
|
patterns specifying files by file name pattern
|
|
|
|
revisions specifying commits
|
|
|
|
templating customizing output with templates
|
2010-09-17 02:51:32 +04:00
|
|
|
[255]
|
2010-08-30 07:48:17 +04:00
|
|
|
$ hg annotate a
|
|
|
|
0: a
|
|
|
|
|
|
|
|
should succeed - up is an alias, not an abbreviation
|
|
|
|
|
|
|
|
$ hg up
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|