I want to create a Git alias to perform multiple commands, but I cant find documentation on how this is done.
Addendum Answer: Often I need more complex commands that decide what to do through positional parameters and branch on the parameters or loop through parameters or input files.
Such commands are too complex for single liners and they are hard to read and edit on one line. But I found a real simple method to do very complex commands from files:
Assume you have a file called alias/cmd in your repository:
!function f {
if [ -z "$1" ]
then echo "Please give me some argument!" 1>&2
exit -1
fi
echo "Hello $1"
}; f
then you can simply say
git config alias.cmd "`cat alias/cmd`"
to define the alias cmd from the file and
git config --get alias.cmd > alias/cmd
to write the defined alias to the file.