The Hg docs state that hg
doesn't support an equivalent to git's index out of the box and suggests using extensions (record or mq) for similar behaviour.
First, I have very little field experience with git
, so let me state my understanding of the concept of staging in git:
- There's the working copy, containing a number of changed files, each having a number of changed chunks.
- The user then (maybe repeatedly) uses
git add
to select which files will be committed. - Alternatively, use
git add -p
to select only some of the chunks in a file to later be committed. - Do a
git commit
to add the previously selected changes to the repository.
So the whole staging area
, to me, is a pompous name for a selection of which of the changes in the working copy will make it in the next commit.
If I'm not completely off on that, then, why does everyone, including the official documentation, state that Mercurial does not support this?
I'm asking, because the exact workflow above is trivial in TortoiseHg:
- in the left pane - select whole files to include in the commit
- in the right bottom pane - select single chunks to include
- hit 'Commit'.
I don't know what hg
commands TortoiseHg uses, but then again, I never needed to care. (It doesn't make use of any extension for this AFAICT)
Is there more to the git
concept of staging that I'm missing?
histedit
extension is a convenient tool for combining multiple commits to one. – Wellpreserved