Git stash pop wants to merge -
i don't understand git stash
. according documentation, may use stash
save current repository state in same if backup/restore repository somewhere.
apparently did else...
i first wanted save work, though untracked files. did:
git stash -u
then did not important work. @ end wanted come original work used command:
git stash pop
the weird thing got message:
auto-merging foo.c conflict (content): merge conflict in foo.c
and inside file got this
++<<<<<<< updated upstream ++======= + // + ++>>>>>>> stashed changes
actually, instead of using stash have used:
cp -r myproject myproject_backup
and later restore work:
rm myproject && mv myproject_backup myproject
what did misunderstand?
it appears work did after pushing stash affected files had in stash (only know happened suspect interaction remote repo), unable re-apply change when popped out of stash.
on same page linked says:
the working directory must match index. applying state can fail conflicts; in case, not removed stash list. need resolve conflicts hand , call git stash drop manually afterwards.
there's lot more information on few other questions, e.g. this one, getting clean state stash removed , changes in working tree.
yes have copied directory away , restored it, you'd have lost 'work' did in between.
Comments
Post a Comment