<div dir="ltr"><div>Jakob you rock!</div><div>You solve problems before i ask, that's unbilievabely efficient!</div><div>Thanks Tobias and Fabio too!<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 29 déc. 2018 à 16:48, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Ah thanks, that sounds great!</div><div>but there is a conflict... I need to check.<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 29 déc. 2018 à 16:37, Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de" target="_blank">forums.jakob@resfarm.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="auto">I openend a pull request with modifications to the hook some months ago. Among other things, it does no longer use the stash there (mostly to make it faster). But it was not integrated yet.</div><br><div class="gmail_quote"><div dir="ltr">Am Sa., 29. Dez. 2018, 16:29 hat Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div>I'm working a lot with git stash.</div><div>This is because while fixing a problem, my analysis lead me thru another piece of code and other problems that I fix too, and at the end, I have a bunch of changes.</div><div>I don't want to commit each single fix, because they are often partial, not well ordered and it would mean rewriting history thru git rebase -i which is OK for not too complex mess, but not that great for interactivity.</div><div>It's much much more simple and interactive to have a pool of changes in the working copy, selectively pick some feature to stage via a good GUI client (sourceTree works well for me), stash the rest to check if compilation OK, etc...</div><div><br></div><div>I even often maintain a stack of stashes for different features.</div><div>For example, I have stashed changes for FloatMathPlugin fixes that I want to be integrated when I compile my own VM, but that I don't want to commit into another feature branch. since git 2.13 it's as simple as</div><div><br></div><div>    git stash push -m "FloatMathPluginFix" platforms/Cross/plugins/FloatMathPlugin/<br></div><div><br></div><div>That's very lightweight compared to having specific branches for doing the merge...<br></div><div><br></div><div>Oui mais voilà, each time I commit, merge or checkout a new branch, my latest stash is popped which mean applied when I don't want to, and removed from my stack of stashes which I ABSOLUTELY do not want to!</div><div>More other, when attempting a rebase -i, I often encounter undesired side effects...<br></div><div>This is really annoying/completely disrupting my own workflow.</div><div>After searching the root cause on forums, I finally discovered the source of my problems: .git/hooks/post-checkout same for post-commit post-merge<br></div><div><br></div><div>It performs a git stash (save), checkout/commit/merge, then git stash pop.</div><div>Err, except that if there is nothing to save, git stash does nothing, but still, git stash pop will pop one of my carefully crafted feature stash.</div><div>This is exactly as described in an answer to</div><div><a href="https://stackoverflow.com/questions/27697835/stash-branch-working-copy-confusion" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/27697835/stash-branch-working-copy-confusion</a></div><div><br></div><div>As suggested in this answer, git stash pop should be perform if AND ONLY IF git stash save changed the SHA1!</div><div>I don't really know how to do that, but would greatly appreciate if the author of these hooks would help me fixing this mess :)<br></div></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>