This is an admittedly silly question, but I honestly don't know if this is possible.
I often mistype "git stash pop" (never-mind why). Can I map/shortcut/alias my typo to what it's supposed to be?
To pop Git stashes, simply use the “git stash pop” command and specify the stash index you want to pop. See the difference in the last line of the example? The stash was dropped and removed from the stack.
git stash apply vs pop : They are almost similar except the fact that git stash pop throws away the (topmost, by default) stash when applying it, whereas git stash apply leaves it within the stash list for possible later use (or you'll then git stash drop it).
git stash pop throws away the (topmost, by default) stash after applying it, whereas git stash apply leaves it in the stash list for possible later reuse (or you can then git stash drop it).
If you made two stashes, then just call git stash pop twice. As opposed to git stash apply , pop applies and removes the latest stash.
git config --global alias.sp 'stash pop'
then git sp
expands to git stash pop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With