How set the git alias to the git. I have searched a git directive below from StackOverflow:
show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
The URL is :
Find the parent branch of a Git branch
Due to the directive is so long, I want to set an alias for it.
I looked the git document. I can't know how to set the complex directive as the alias.