• 在当前分支执行:(这里暂存名字建议不一样)
git stash push -u -m "billing-withdraw-temp-2"
-u 会把新增文件也一起暂存,比如新建的 vue 文件。
然后切其他分支:
git checkout 其他分支名
一会回来恢复:
git checkout 当前分支名 git stash list git stash apply "stash@{0}"
确认没问题后可以删掉这条 stash:
git stash drop stash@{0}