I have created an alias for this git diff --stat origin/master.
The alias for this is
[alias]
dp = "!DIFF_PREVIEW=$(git diff --stat origin/master HEAD);"
When I run dp, Git Bash works, but it does not show anything in the terminal window.
If I type git diff --stat origin/master, it actually shows my commits in the terminal window.
How can I modify my alias so it reproduces this as well?
DIFF_PREVIEW; that's why runninggit dpprints nothing. Why are you doing that? Are you using the value ofDIFF_PREVIEWat all?