贝隆

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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>...]'

 

posted on 2022-03-01 11:05  贝隆  阅读(67)  评论(0)    收藏  举报