2017-05-25 95 views

回答

1

找出你想要保存的你最喜欢的储藏参考,例如[email protected]{3}

#create a tag for the favorite stash ref 
git tag mystash [email protected]{3} 
#clear all stash refs 
git stash clear 
#reproduce the favorite stash 
git reset mystash 
git stash 
#clear the tag 
git tag -d mystash 
+0

这是个好主意吗? 'git reset'会在当前分支上重击。你可以稍后再用另一个'git reset'修复它,也许。一个更好的主意可能是使用'git stash store'从临时标签重新创建存储。 – torek

+0

@torek介意添加命令?不知道他们将如何使用商店不同,谢谢你的朋友。 – Andrew

+0

@torek谢谢。我不知道'git stash restore'。 – ElpieKay

相关问题