Re: More Beginning Git Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski wrote:

>>> > Generally Alice shouldn't have uncommitted changes when doing
>>> > "git pull".
>>> 
>>> That's what the tutorial said but I'm trying to understand
>>> what happens if she does have uncommitted changes. I'm
>>> trying to understand the total picture.
>> 
>> Mercurial allows this, and it's a very powerful feature.
> 
> You *do* realize thet "hg pull" is "git fetch", don't you?

Yes.  This is what I mean:

    c:\test>hg diff

    diff --git a/foo b/foo
    --- a/foo
    +++ b/foo
    @@ -1,1 +1,2 @@
     test
    +new line

    c:\test>hg incoming --patch clone

    comparing with clone
    searching for changes
    changeset:   1:0a897c3462a8
    tag:         tip
    user:        tactical
    date:        Sat Sep 24 23:03:21 2011 +0100
    summary:     bar

    diff --git a/foo b/foo
    --- a/foo
    +++ b/foo
    @@ -1,1 +1,2 @@
     test
    +bar

    c:\test>hg pull clone

    pulling from clone
    searching for changes
    adding changesets
    adding manifests
    adding file changes
    added 1 changesets with 1 changes to 1 files
    (run 'hg update' to get a working copy)

    c:\test>hg update

    merging foo

Now KDiff3 automagically appears (because of the line conflict).

>>  After reading 
>> this thread, I could not believe Git didn't pulling with local changes, and 
>> so I tried it, and also asked on IRC -- and it seems that Git really 
>> doesn't.
>> 
>> If this is an important part of your workflow (as it is mine), I'd 
>> recommend using Mercurial if possible.
>> 
> 
> So the question is if mercurial allows _merging_ with local
> changes... and from the thread it looks like git dies allow it, as
> long as changes are isolated from changes brought by merge.

For that reason, Git doesn't support my workflow at all.

> Anyway merging with local changes is an easy way to f**k up your
> changes in unrecoverable way, IMVHO...

Mercurial backs everything up before doing this merge, so if I do lose my
local changes, I can start over with this:

    hg resolve --unmark --all
    hg resolve --all

Now KDiff3 comes up again, with the same data as before.  No data lost.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]