要在运行git stash之后获取最新的stash,请使用
git stash apply
要查看您的藏匿处列表,请使用
git stash list
您将获得一个看起来像这样的列表
stash@{0}: WIP on master: 67a4e01 Merge tests into develop stash@{1}: WIP on master: 70f0d95 Add user role to localStorage on user login
选择一个不同的git stash进行恢复,并显示所需的stash数量
git stash apply stash@{2}
您还可以选择“ git stash pop”,它的作用与“ git stash apply”相同。
git stash pop
要么
git stash pop stash@{2}
git stash应用和git stash弹出的区别...
git stash pop:-藏匿数据将从藏匿列表堆栈中删除。
例如:-
git stash list
您将获得一个看起来像这样的列表
stash@{0}: WIP on master: 67a4e01 Merge tests into develop stash@{1}: WIP on master: 70f0d95 Add user role to localStorage on user login
现在使用命令弹出隐藏数据
git stash pop
再次检查隐藏列表
git stash list
您将获得一个看起来像这样的列表
stash@{0}: WIP on master: 70f0d95 Add user role to localStorage on user login
您可以看到一个存储数据已从存储列表中删除(弹出),并且存储@ {1}变为存储@ {0}。