79098971

Date: 2024-10-17 16:11:04
Score: 0.5
Natty:
Report link

I use Windows and somehow the other answers did not work for me. I had to add this to my %USERPROFILE%/.gitconfig (in the [alias] section):

stash-rename = "!sh -c 'export rev=$(git rev-parse stash@{$0}) && git stash drop stash@{$0} || exit 1 && git stash store -m \"${1:-STASH}\" $rev; echo Renamed $rev to \\\"${1:-STASH}\\\", now stash@{0}; git stash list'"

Now I can do this to rename stash 0:

git stash-rename 0 "Whatever name I want"
Reasons:
  • Blacklisted phrase (1): did not work
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Michel de Ruiter