I have a workflow that first check git diff for specific file and then add it to stage.
git diff ..
^diff^add
I want to give these command a alias but this one doesn't work
alias da="^diff^add"
command not found: ^diff^add
You can't do it that way. History substitution (i.e. the handling the ^ and !) is done before alias expansion.
Use fc -s instead:
$ alias da='fc -s diff=add'
$ echo git diff
git diff
$ da
echo git add
git add