How to keep the change before switching to another branch in Git
<p>We're maintaining several Git branches, we switch branch frequently because of the incoming bugs from different customers.</p>

<p>Sometimes, we want to keep the code change on branch01 before switching to branch02. </p>

<p>And next hour, we may switch back to branch01, in this case we also want to keep the work on branch02 before switching back to branch01.</p>

<p>This may sound strange to you, but it does happen in our daily maintenance work.</p>

<p>We try git stash, but it doesn't work as I expected in this case.</p>

<p>We also don't want to do git commit before switching to another branch because the work has not quite yet done. </p>

<p>I'm wondering to know, what Git process should be used to deal with this kind of situations.</p>

<p>Thanks!</p>