使用git stash.
1. 假定項目中有一個文件刪除之
git rm README.rdoc
2. 執行
git status
顯示:
Saved working directory and index state WIP on master: bfcdf14 test git HEAD is now at bfcdf14 test git
3. 使用 git stash list
$ git stash list stash@{0}: WIP on master: bfcdf14 test git
4. 拿出來使用 git stash pop
git stash pop