* git merge --abort deletes unstaged files
@ 2014-09-15 15:43 André Hänsel
2014-09-15 17:16 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: André Hänsel @ 2014-09-15 15:43 UTC (permalink / raw)
To: git
As discussed in
https://groups.google.com/forum/#!topic/git-users/uR7gzLL2Ovc:
I ran git merge to merge a branch. There were some conflicted files.
Although they were automatically resolved by git rerere, I still had to add
them. I accidentally ran "git add ." instead of "git add -u". I noticed my
mistake and ran "git merge --abort" to start over. To my dismay all my
untracked files were gone.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git merge --abort deletes unstaged files
2014-09-15 15:43 git merge --abort deletes unstaged files André Hänsel
@ 2014-09-15 17:16 ` Andreas Schwab
2014-09-15 19:25 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2014-09-15 17:16 UTC (permalink / raw)
To: André Hänsel; +Cc: git
André Hänsel <andre@webkr.de> writes:
> I ran git merge to merge a branch. There were some conflicted files.
> Although they were automatically resolved by git rerere, I still had to add
> them.
If you want them to be added automatically, set rerere.autoupdate=true.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git merge --abort deletes unstaged files
2014-09-15 17:16 ` Andreas Schwab
@ 2014-09-15 19:25 ` Junio C Hamano
2014-09-15 21:54 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2014-09-15 19:25 UTC (permalink / raw)
To: Andreas Schwab; +Cc: André Hänsel, git
Andreas Schwab <schwab@linux-m68k.org> writes:
> André Hänsel <andre@webkr.de> writes:
>
>> I ran git merge to merge a branch. There were some conflicted files.
>> Although they were automatically resolved by git rerere, I still had to add
>> them.
>
> If you want them to be added automatically, set rerere.autoupdate=true.
I would have to caution against doing so without thinking, though.
In other words, it is OK if you are Andreas who knows what he is
doing, but it is not a very good advice to give to random newbies.
"rerere" will apply whatever matching previous resolution, which may
hopefully be the correct resolution this time too, but it is a good
habit to get into to double check if such a merely textual side-port
of previous resolution is really applicable to the current conflict.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git merge --abort deletes unstaged files
2014-09-15 19:25 ` Junio C Hamano
@ 2014-09-15 21:54 ` Andreas Schwab
2014-09-15 22:02 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2014-09-15 21:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: André Hänsel, git
Junio C Hamano <gitster@pobox.com> writes:
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> André Hänsel <andre@webkr.de> writes:
>>
>>> I ran git merge to merge a branch. There were some conflicted files.
>>> Although they were automatically resolved by git rerere, I still had to add
>>> them.
>>
>> If you want them to be added automatically, set rerere.autoupdate=true.
>
> I would have to caution against doing so without thinking, though.
> In other words, it is OK if you are Andreas who knows what he is
> doing, but it is not a very good advice to give to random newbies.
If you are used to doing "git add ." afterwards it can't be much worse.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git merge --abort deletes unstaged files
2014-09-15 21:54 ` Andreas Schwab
@ 2014-09-15 22:02 ` Junio C Hamano
2014-09-15 22:28 ` Andreas Schwab
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2014-09-15 22:02 UTC (permalink / raw)
To: Andreas Schwab; +Cc: André Hänsel, Git Mailing List
On Mon, Sep 15, 2014 at 2:54 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>
>>> André Hänsel <andre@webkr.de> writes:
>>>
>>>> I ran git merge to merge a branch. There were some conflicted files.
>>>> Although they were automatically resolved by git rerere, I still had to add
>>>> them.
>>>
>>> If you want them to be added automatically, set rerere.autoupdate=true.
>>
>> I would have to caution against doing so without thinking, though.
>> In other words, it is OK if you are Andreas who knows what he is
>> doing, but it is not a very good advice to give to random newbies.
>
> If you are used to doing "git add ." afterwards it can't be much worse.
The right response to such a user would be to teach "add -u", or better yet
to teach to use "add" on individual files as they are examined, no?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git merge --abort deletes unstaged files
2014-09-15 22:02 ` Junio C Hamano
@ 2014-09-15 22:28 ` Andreas Schwab
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2014-09-15 22:28 UTC (permalink / raw)
To: Junio C Hamano; +Cc: André Hänsel, Git Mailing List
Junio C Hamano <gitster@pobox.com> writes:
> On Mon, Sep 15, 2014 at 2:54 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>>
>>>> André Hänsel <andre@webkr.de> writes:
>>>>
>>>>> I ran git merge to merge a branch. There were some conflicted files.
>>>>> Although they were automatically resolved by git rerere, I still had to add
>>>>> them.
>>>>
>>>> If you want them to be added automatically, set rerere.autoupdate=true.
>>>
>>> I would have to caution against doing so without thinking, though.
>>> In other words, it is OK if you are Andreas who knows what he is
>>> doing, but it is not a very good advice to give to random newbies.
>>
>> If you are used to doing "git add ." afterwards it can't be much worse.
>
> The right response to such a user would be to teach "add -u",
That's actually what I meant above.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-15 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-15 15:43 git merge --abort deletes unstaged files André Hänsel
2014-09-15 17:16 ` Andreas Schwab
2014-09-15 19:25 ` Junio C Hamano
2014-09-15 21:54 ` Andreas Schwab
2014-09-15 22:02 ` Junio C Hamano
2014-09-15 22:28 ` Andreas Schwab
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.