The following command works in the console:
git reset --soft `git rev-parse --abbrev-ref --symbolic-full-name @{u}` && git commit --edit -m "$(git log --format=%B --reverse HEAD..HEAD@{1})"
It is meant to squash the unpushed commits into one and give a chance to edit the message. See Find out which remote branch a local branch is tracking and Squash my last X commits together using Git for more details.
However the following alias fails:
squash-uncomited = reset --soft `git rev-parse --abbrev-ref --symbolic-full-name @{u}` && git commit --edit -m "$(git log --format=%B --reverse HEAD..HEAD@{1})"
✗ git squash-uncomited error: unknown option `abbrev-ref'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] []
or: git reset [-q] [--] ... or: git reset --patch [] [--] [...]
Why is it so ? What is the difference with aliases and CLI commands ?