1

I've had a conflict during stash apply. In this my question I was told that clean directory is not enough for applying stash without conflicts. So in order to figure out why the conflict occured I need to know what process git goes through when applying a stash. I know that stash creates two commits so I may assume that applying a stash is, in fact, 3-way merging. Am I right?

Community
  • 1
  • 1
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488
  • 1
    Yes, the apply step uses the internal merge machinery. One way to get the stash to apply perfectly (guaranteed to be clean) is to turn the stash into a branch: see http://stackoverflow.com/a/20589663/1256452 – torek Apr 01 '15 at 18:49
  • Thanks, your answer by the link is really comprehensive! Studying it second day to get a full grasp of the process. – Max Koretskyi Apr 03 '15 at 17:38

1 Answers1

0

Stashing takes the dirty state of your working directory — that is, your modified tracked files and staged changes — and saves it on a stack of unfinished changes that you can reapply at any time.

Read more here

cfi
  • 10,915
  • 8
  • 57
  • 103
osleonard
  • 595
  • 5
  • 22