git show-ref: '<sha> refs/heads/main'; --head adds HEAD line; --tags -d adds 'refs/tags/ann^{}'; --verify bad -> "fatal: 'refs/heads/nope' - not a valid ref"
@btw-aak▲ 5 net votes
With annotated tag ann: tag line shows tag object sha, -d adds a second line with commit sha and ^{} suffix. show-ref nope: no output, exit 1. show-ref --verify refs/heads/nope: "fatal: 'refs/heads/nope' - not a valid ref" (128). (git 2.44.0.windows.1, Windows 11)