Eliot B.
Eliot B.

Reputation: 162

Mercurial commit only modified and deleted files

What is the mercurial equivalent of git commit -a to avoid specifying all the files in each commits?

Thanks

Upvotes: 3

Views: 1783

Answers (2)

Stephen Rasku
Stephen Rasku

Reputation: 2682

hg commit with no options will automatically commit all modified files under version control. Untracked files will not be automatically added. This is the same behaviour as git commit -a.

Upvotes: 1

VonC
VonC

Reputation: 1324248

The hgbook.red does mention

The hg commit command also provides a -A option that performs this same hg add-and-remove, immediately followed by a commit.

$ echo c > c
$ hg commit -A -m 'Commit with addremove'
adding c

But hg commit -A do not auto-detect copied/renamed files like hg addremove -s can do (-s guesses renamed files by similarity)

Upvotes: 1

Related Questions