git -C /opt/myapp rev-parse --short HEAD

Category: VPS Management

git -C /opt/myapp rev-parse --short HEAD

Show the deployed commit hash

Prints the abbreviated commit SHA currently checked out in /opt/myapp — the exact code version running in production. Compare it with your CI's latest build to prove a deploy actually landed. The full hash (drop --short) is what you would record in a deployment log.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.