kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #34895
Re: Git noob question
-
To:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Kevin Cozens <kevin@xxxxxxxxx>
-
Date:
Mon, 12 Mar 2018 16:02:55 -0400
-
In-reply-to:
<CAOuK9LiA4z=RH5K6e24ekJK2o6ozoaxLQZmbRj7ZbE6v5F2Mzg@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
On 2018-03-11 11:52 AM, Nick Østergaard wrote:
That sounds a bit risky. Using the stash and popping can make you lose your
local changes if you decide to abort a potential merge conflict. IIRC.
Commiting changes are generally safer. Or you could use git stash apply instead.
The risk of lose comes from how you try to resolve the merge conflict that
arises from trying to apply the stashed changes whether you use pop or
apply. When applying stashed changes triggers a merge conflict the stashed
changes stay stashed. If you try to abort a merge git will say there is no
merge in progress. If you tell git to reset the source tree it will tell you
that there is a merge in progress so it won't reset the tree.
You then have code in a Heisenberg box situation. The code is simultaneously
in the middle of a merge and not in the middle of a merge. The only really
safe way to protect against potential merge conflict when you go to apply
the stashed changes is to save the output of a "git diff" before you stash
changes not yet commited.
Subversion was much better about dealing with conflicts. It would tell you
there is a conflict but apply changes to files so you could see the before
and after. You then had to manually fix the conflicts. No loss of changes
and no being unable to access what the changes were. I've had no success
trying to save stashed changes as a file so I could manually fix a merge
conflict.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"Nerds make the shiny things that distract
https://patreon.html/KevinCozens | the mouth-breathers, and that's why we're
| powerful"
Owner of Elecraft K2 #2172 |
#include <disclaimer/favourite> | --Chris Hardwick
Follow ups
References
-
Git noob question
From: Jeff Young, 2018-03-02
-
Re: Git noob question
From: Wayne Stambaugh, 2018-03-02
-
Re: Git noob question
From: Jon Evans, 2018-03-02
-
Re: Git noob question
From: Seth Hillbrand, 2018-03-02
-
Re: Git noob question
From: Wayne Stambaugh, 2018-03-02
-
Re: Git noob question
From: Jeff Young, 2018-03-02
-
Re: Git noob question
From: Wayne Stambaugh, 2018-03-02
-
Re: Git noob question
From: Jeff Young, 2018-03-02
-
Re: Git noob question
From: Tiger12506, 2018-03-03
-
Re: Git noob question
From: Maciej Suminski, 2018-03-03
-
Re: Git noob question
From: Kevin Cozens, 2018-03-10
-
Re: Git noob question
From: Nick Østergaard, 2018-03-11