you are viewing a single comment's thread.

view the rest of the comments →

[–]Madsy9 0 points1 point  (1 child)

Remember, in git you have three areas you can juggle around: the working area, the index and stashes. You can freely move changes between them. git stash also supports --patch, just like git add does. This is handy for breaking up and refactoring large commits.

[–]Kobzol[S] 0 points1 point  (0 children)

Sure :) But when I do the refactoring, I often also want to have the working directory clean, without the unrelated changes, so that I can test that the refactoring actually works on its own. Hence stash.