What is the intended use-case for git stash?

前端 未结 7 1624
野性不改
野性不改 2020-12-22 15:39

If I work on branch A and suddenly need to work on branch B before being ready with a commit on branch A, I stash my changes on A, checkout B, do my work there, then checkou

7条回答
  •  無奈伤痛
    2020-12-22 16:00

    The stash command will stash any changes you have made since your last commit. In your case there is no reason to stash if you are gonna continue working on it the next day. I would only use stash to undo changes that you don't want to commit.

提交回复
热议问题