Vladimir Panteleev wrote: > On Thu, 28 Oct 2010 00:33:54 +0300, Jérôme M. Berger <[email protected]> > wrote: > >> The only true advantage that Git has over Mercurial is the staging >> area, and even that is a two edged sword: IMO it should not be >> enabled by default since it helps people to lose data. And the same >> functionality can be emulated (and superseded) in Mercurial with >> record and mq anyway. > > Could you please explain to me how can the staging area cause you to > lose data? The only way I see that can happen is if you forget that you > staged some changes, then do "git diff" and think that your working > directory (and index) are clean. > git commit git push # Is that the right command to send my changes # to the main repo?
# OK, I'm done working on that
cd ..
rm -r myrepo
# Ooops
>> - It is safer on Windows: in six years, I have never had a data loss
>> or corruption, whereas I've had both with Git in a two days test
>> without doing anything special;
>
> Sorry, I don't consider this to be true at the moment based on my
> experience.
>
>> - Repositories are smaller on Windows (ok, that's not so important
>> given the price of HDDs today);
>
> How does that make sense? Doesn't Git use the same disk storage format
> everywhere? :o
>
I meant Mercurial repositories are smaller than Git repositories on
Windows (didn't check anywhere else)
>> - You really, really, really *always* need the staging area so you
>> want to have it by default instead of using mq. If that is the case,
>> you will probably wind up using quilt anyway (quilt is the Git
>> equivalent for mq).
>
> I think the staging area is an amazing feature, and I use it all the
> time, but perhaps not in the way you imagine:
>
> 1) Hack up a bunch of changes
> 2) Fire up git gui
> 3) Quickly stage the chucks or lines you want to go into the first
> commit (one case where using a mouse-driven GUI is way more productive...)
> 4) Type commit description, Ctrl+Enter to instantly commit
> 5) Repeat, until working directory is clean
>
> This allows me to work freely on my code and edit different parts of it,
> without having to worry that I should first commit / shelve unrelated
> changes first.
>
This workflow is fully supported by the crecord extension (or by
TortoiseHg).
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
