git 忘记建立分支处理方法

没提交代码的制情况:

git stash

git pull

git checkout xxx

git stash pop

已提交代码的情况:

git reset HEAD~1

git stash

git checkout xxx

git stash pop