In brief
git rev-parse resolves and checks Git names. The common example git rev-parse HEAD returns the current commit identifier.
Useful to know
git rev-parse resolves and checks Git names. The common example git rev-parse HEAD returns the current commit identifier. [1]
Automation benefits from recording the exact version rather than only a moving branch name. Specify the expected object type and handle resolution failure. A familiar short name does not guarantee existence or identical meaning in every repository.
Sources
For further detail and to check the information: