# git module and sha value of HEAD

**URL:** <https://forum.ansible.com/t/git-module-and-sha-value-of-head/13943>\
**Category:** Ansible Project\
**Created:** [November 20, 2013, 5:36pm UTC](https://forum.ansible.com/t/git-module-and-sha-value-of-head/13943 "2013-11-20T17:36:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome\_Wagner](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@Jerome\_Wagner](https://forum.ansible.com/u/Jerome_Wagner)\
**Post date:** [November 20, 2013, 5:36pm UTC](https://forum.ansible.com/t/git-module-and-sha-value-of-head/13943/1 "2013-11-20T17:36:44Z")

</div>

Hello,

I am trying to capture the current sha of a git clone just after doing a git clone on HEAD with the git: module.

Do you know if this is possible and if yes, how it can be done ?

Thank you

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 20, 2013, 5:48pm UTC](https://forum.ansible.com/t/git-module-and-sha-value-of-head/13943/2 "2013-11-20T17:48:04Z")

</div>

Register the variable with “register”

Assume registering as “foo”, you will be able to access both foo.before and foo.after
