mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 08:41:43 +00:00
Add the ability to recover dropped Git stashes
This commit is contained in:
14
modules/git/functions/git-stash-recover
Normal file
14
modules/git/functions/git-stash-recover
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Recovers dropped Git stashed states.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
local commit
|
||||
|
||||
for commit in "$@"; do
|
||||
git update-ref \
|
||||
-m "$(git log -1 --pretty="format:%s" "$commit")" refs/stash "$commit"
|
||||
done
|
||||
|
Reference in New Issue
Block a user