Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias git stash poop to pop?

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?

like image 996
jgillman Avatar asked Jan 16 '12 23:01

jgillman


People also ask

How do I pop something from git stash?

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.

Does git stash apply pop the stash?

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).

What is git stash and git stash pop?

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).

Can I git stash pop twice?

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.


1 Answers

git config --global alias.sp 'stash pop' 

then git sp expands to git stash pop

like image 68
milan Avatar answered Sep 17 '22 14:09

milan