1.查看git状态
# git status
# 位于分支 release-v3.1.0-remove-swagger
# 尚未暂存以备提交的变更:
# (使用 "git add <file>..." 更新要提交的内容)
# (使用 "git checkout -- <file>..." 丢弃工作区的改动)
#
# 修改: app/ui-react/packages/models/openapi.internal.json
# 修改: app/ui-react/packages/models/openapi.json
#
修改尚未加入提交(使用 "git add" 和/或 "git commit -a")
2.git stash
# git stash save "check branch"
Saved working directory and index state On release-v3.1.0-remove-swagger: check branch
HEAD 现在位于 c847947 test http-api
3.查看stash
git stash list
stash@{0}: On release-v3.1.0-remove-swagger: check branch
4.恢复stash
git stash apply后跟stash名称
# git stash apply a
fatal: ambiguous argument 'a': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
浙公网安备 33010602011771号