Re: [PATCH] Documentation: warn against merging in a dirty tree

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

 



On Mon, Sep 15, 2008 at 7:42 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:
>
>> Merging in a dirty tree is usually a bad idea because you need to
>> reset --hard to abort; but the docs didn't say anything about it.
>
> Strictly speaking, you do not have to worry about anything if (1) all of
> your work tree changes are easily reproducible (Linus's keeping a new
> EXTRAVERSION in his Makefile, never staged nor committed is an often cited
> example), or (2) you know beforehand that a merge with the other party
> will not touch the part you have local changes that you care about.
>
> In other words, you need to know what you are doing, and a warning with
> "usually it is a bad idea" would be an appropriate thing to do.

But how do you abort a *failed* merge in a situation like Linus's
example?  "git reset --hard HEAD" would destroy the unstaged Makefile
change.

I would love to know the answer to this for my own work, and I guess
it would be relevant to the documentation too.

Have fun,

Avery
--
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]

  Powered by Linux