How to get the current git commit id? Apr 24, 2019 Do this: $ git rev-parse HEAD This gives you the full commit id, for the short id, run this: $ git rev-parse --short HEAD