When should a user prefer one of `hg amend` or `hg commit --amend`?
Bryan Murdock
bmurdock at gmail.com
Fri Oct 23 20:22:20 UTC 2015
On Fri, Oct 23, 2015 at 1:47 PM, Long Vu <long.vu at intelerad.com> wrote:
> So both add the uncommitted changes in the workdir into the new commit
> and obsolete the original one.
>
> `hg amend` create a "temporary amend commit" while `hg commit --amend` do not.
>
> `hg amend` has -D which can replace `hg qrefresh -D` while `hg commit
> --amend` do not.
>
> So if we need -D, then need to use `hg amend`, otherwise `hg commit
> --amend` is preferred to not have the temporary amend commit
> cluttering up the repo?
>
> Is that an acceptable answer or there is technical difference under
> the hood that makes one superior than the other?
hg amend only exists if you are using the evolve extension. I stopped
using hg commit --amend when I started using evolve. I don't worry
about "clutter" with evolve, all the extra commits are hidden and you
can clean them up with an hg strip if you really want to.
Bryan
More information about the Evolve-testers
mailing list