Clarify git stash for me in switching branches
Posted
by
EmmyS
on Super User
See other posts from Super User
or by EmmyS
Published on 2012-12-05T15:33:12Z
Indexed on
2012/12/05
17:07 UTC
Read the original article
Hit count: 170
git
I've been working on branch A. My work there is not finished, but I need to switch to branch B for a while. It looks like stash
is the command to use. I've found a number of references showing how to use stash to save your changes, but I'm a bit confused. All of the references say something like, when you're ready to go back, just do git stash pop
. They don't, however, tell me if I need to switch back to branch A before doing that, though.
So, do I manually go back to branch A before running stash pop, or do I stay in branch B, and the actual act of running stash pop will send me back to branch A where I left off with it?
© Super User or respective owner