I\'m trying to commit only certain files with Mercurial. Because of of hg having auto-add whenever I try to commit a change it wants to commit all files. But I don\'t want t
As of 3.8 you can also use hg commit --interactive
to select the files (before 3.8 you can use crecord extension for similar functionality). The --interactive
(or just -i
) flag will cause hg to prompt you for the files you want to include in the commit. As an added bonus you can even include/exclude chunks within the files.
Here is an example of what the interface looks like. Note this is an old screenshot (of crecord actually) so interface has changed slightly (but basics are the same).
Note to get that interface you need the curses interface enabled. You can do that for single run with hg commit --config ui.interface=curses --interactive
or generally by adding the the following to your .hgrc
:
[ui]
interface = curses