r/PowerShell • • Dec 09 '25

Question Make custom commands in Powershell

Can you make a custom command in powershell, and if so, how?

I want to make a command that does:

git add -A

git commit -m "catchup"

git pull

In one go.

Also, feel free to tell me if making a lot of commits with the same name to pull is bad practice, though i want this for small projects with friends :)

30 Upvotes

41 comments sorted by

View all comments

Show parent comment

1

u/meon_be Dec 09 '25

$PROFILE is a variable pointing to your PowerShell-profile, a file that gets loaded every time you open a shell. With Add-Content you're adding the contents between @""@ to that file. The contents is a small function called "ketchup" that will execute those commands in sequence.