Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use a parameter in a windows git alias?

Tags:

git

I have the following alias in git under Windows:

ss = \"!git stash save $1\"

If I enter git ss abc in git bash I get:

expansion of alias 'ss' failed; '!git stash save $1' is not a git command

How can I get this to work?

like image 978
wlf Avatar asked Dec 17 '25 05:12

wlf


1 Answers

The last parameter for an alias can be simply omitted:

ss = "!git stash save"

For more complex parameterization see https://stackoverflow.com/search?q=%5Bgit%5D+alias+parameters

like image 166
phd Avatar answered Dec 19 '25 22:12

phd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!