Hello everybody.  Let me setup a *stash scenario *for you which I have 
several questions about...  I apologize for the number of questions ahead 
of time, but the explanations I have found thus far on the net are too 
rudimentary, and I have not had time to setup my own sandbox to mess around.

Each step is in chronological order:

1. I have checked out a branch, let's call it "*branchA*" and made some 
2. The QA team comes back with some priority 1 bug fixes and so I must 
quickly stash my changes and switch over to "*branchB*."  Let's assume I 
use the following commands to do this (just for clarity sake):

> $ git stash save
> $ git checkout *branchB*
3. I finish all of my patching / bug fixes and commit those changes, but I 
have not yet checked out *branchA *yet...

This is where I get confused.  My intuition tells me there is no reason to 
stash pop until I've checked out *branchA *again, but there seems to be 
very little clarification on how the pop affects the branches I am 
currently working on...  *So *my question is - when I pop and/or apply the 
stashed changes - since I'm still in *branchB *will it mess up any of the 
code in *branchB*?  If yes - why?  If not - would I need to do another git 
add/commit before it does?

Basically - my understanding, which is more of an assumption at this point, 
is that to get those stashed code changes back into the branch I want I 
would need to (again in chronological order):

$ git checkout *branchA*
$ git stash pop
... finalize changes/do some coding...
$ git add changedfiles
$ git commit

$ git pull
$ git push

Is this correct?

Feedback is appreciated!


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to