2017-05-25 94 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

相關問題