我在树枝上藏了点东西。如何在git stash之前获取我的文件?
git stash
git checkout other-branch
git stash pop我之前没有保存它们。
发布于 2020-06-30 15:19:19
如果您的意思是“我希望我的文件与运行初始git stash之前一样”:请返回到调用git checkout other-branch之前的提交位置,并重新应用存储
# clean your worktree :
git stash
# go back to the previous branch :
git checkout the/active/branch/before/other-branch
# apply the stash :
git stash pop如果您想多次“应用存储”,则可以使用git stash apply而不是git stash pop。
如果你的意思是:“我想要我的文件在我运行git stash pop之前的样子”,只需重新隐藏内容:
git stashhttps://stackoverflow.com/questions/62651196
复制相似问题