Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-all() support git submodule and add drop-all() function #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion git-rstash
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ function drop() {
# core.abbrev configuration variable, it can be varied from machine to machine.
stashCommit=$(git rev-parse stash@{$stashNum})

read -p "Really delete stash $stashNum (commit ${stashCommit:0:8}) from $remote? " answer
read -p "Really delete stash $stashNum (commit ${stashCommit:0:8}) from $remote and local refs/stashes? " answer
if [ "$answer" == 'y' ]
then
# remove from remote refs/stashes
git push $remote :refs/stashes/$stashCommit
# remove from local refs/stashes
git update-ref -d refs/stashes/$stashCommit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important; I added this as a comment to the original Stack Overflow answer (and obviously credited you).

fi
}

Expand Down