0

I want a simple alias I can run to

git add -A
git commit -m "$parm1"
git push

that's all. I'd take any help at this rate. Powershell is well horrible compared to Linux terminals but I'm trying to learn.

    function gitup {
    params(
    [string] $msg
    )

    git add -A
    git commit -m " $msg "
    git push
}
mkamran94
  • 58
  • 5

1 Answers1

1

You have a typo, it's "param" not "params".

As for having this as a convenient alias, it's recommended to put a function like this in your profile.

A question with more detail about profiles- How do I add a PowerShell cmdlet or function to my machine so that it is always available?

OwlsSleeping
  • 1,487
  • 2
  • 11
  • 19