2025-03-14 21:59:59 -06:00
|
|
|
# hg commit
|
|
|
|
|
|
|
|
|
|
> Commit all staged or specified files to the repository.
|
|
|
|
|
> More information: <https://www.mercurial-scm.org/doc/hg.1.html#commit>.
|
|
|
|
|
|
|
|
|
|
- Commit staged files to the repository:
|
|
|
|
|
|
|
|
|
|
`hg commit`
|
|
|
|
|
|
|
|
|
|
- Commit a specific file or directory:
|
|
|
|
|
|
|
|
|
|
`hg commit {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
|
|
- Commit with a specific message:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg commit {{[-m|--message]}} {{message}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Commit all files matching a specified pattern:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg commit {{[-I|--include]}} {{pattern}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Commit all files, excluding those that match a specified pattern:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg commit {{[-X|--exclude]}} {{pattern}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Commit using the interactive mode:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`hg commit {{[-i|--interactive]}}`
|