Home > Software design >  How do I use a parameter in a windows git alias?
How do I use a parameter in a windows git alias?

Time:07-08

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?

CodePudding user response:

The last parameter for an alias can be simply omitted:

ss = "!git stash save"

For more complex parameterization see https://stackoverflow.com/search?q=[git] alias parameters

  •  Tags:  
  • git
  • Related