📅  最后修改于: 2022-03-11 14:49:54.940000             🧑  作者: Mango
# 1. Stash current changes
git stash
# 2. Create stash as patch (0 is the index of the stash)
# If you have multiple stashes, you can use >> to append the next
# stash to the same file
# e.g. .. "stash@{1}" -p >> changes.patch
# .. "stash@{2}" -p >> changes.patch. etc..
git stash show "stash@{0}" -p > changes.patch
# 3. Apply patch
git apply changes.patch