2016年8月19日 星期五

[學習] Git (13) stash 暫存工作目錄與索引變更

指令
* git stash          儲存modified、staged狀態的檔案
* git stash save        跟上面一樣
* git stash -u         儲存所有檔案含untracked
* git stash save -u       跟上面一樣
* git stash list         顯示所有暫存清單
* git stash pop         回覆到最新的暫存檔儲存狀態並把該暫存檔刪掉
* git stash apply        回覆到最新的暫存檔儲存狀態並留下該暫存檔
* git stash pop "stash@{id}"   回復到指定的暫存檔儲存狀態並把該暫存檔刪掉
* git stash apply "stash@{id}"  回復到指定的暫存檔儲存狀態並留下該暫存檔
* git stash drop "stash@{id}"   刪除指定暫存檔
* git stash clear         清空所有暫存檔

沒有留言:

張貼留言