Sunday, 15 February 2015

Git stashing confusion -



Git stashing confusion -

the problem stashed changes won't remain in branched stashed them. , other branches stashes overwritten example:

i do:

git checkout iss4 // made changes git stash

and says:

saved working directory , index state wip on iss4: 9dd2345 /.../

then do:

git checkout master

and when git stash show, can still see stashed changes. makes so, overrides other stashes on other branches. yes, when realized this, had, lost week of work :/(edit: comes out didn't lose it, had in stashes list =) )

and question how create can work on several branches @ once.

stashes not branch specific; while remember head applied on (as parent), exist “globally” in repository.

more importantly though, stashes not restricted single one. if git stash, chances have accumulated larger number of stashes. can see stashes using git stash list. if want apply specific stash current working directory, can git stash apply stash@{n} then.

git

No comments:

Post a Comment