Git Stash 与 gwip
1、如何在不提交修改的前提下,执行 pull 或分支切换的操作?
git pull --rebase --autostash # gupa2、git stash
# 查看 stash 列表中已暂存了多少 WIP
git stash list # gstl
# 添加当前 WIP
# -u 参数表明新增的文件也一起 stash
git stash -u save 'message' # gsta -u
# 恢复上一次的 WIP 状态,并从列表中移除
git stash pop # gstp
# 恢复指定编号的 WIP,同时从列表中移除
git stash pop stash@{num} # gstp 0
# 恢复指定编号的 WIP,但不从列表中移除
git stash apply stash@{num} # gstaa 03、gwip 与 gunwip
Last updated