# How to deploy a particular git branch and commit id using ansible git module?

**URL:** <https://forum.ansible.com/t/how-to-deploy-a-particular-git-branch-and-commit-id-using-ansible-git-module/18805>\
**Category:** Ansible Project\
**Created:** [July 20, 2015, 3:48am UTC](https://forum.ansible.com/t/how-to-deploy-a-particular-git-branch-and-commit-id-using-ansible-git-module/18805 "2015-07-20T03:48:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adithya\_Khamithkar](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Adithya\_Khamithkar](https://forum.ansible.com/u/Adithya_Khamithkar)\
**Post date:** [July 20, 2015, 3:48am UTC](https://forum.ansible.com/t/how-to-deploy-a-particular-git-branch-and-commit-id-using-ansible-git-module/18805/1 "2015-07-20T03:48:06Z")

</div>

Hi,  
I would need some help in how to deploy a particular git branch and commit id using ansible git module,

`

- name: Deploy  
git: repo={{project\_repo}} dest={{project\_doc\_root}} accept\_hostkey=yes  
`

This is the command i am using which i would like to extend.

Thanks,

---

<div class="post-metadata">

**Author:** ![Chris\_Church1](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@Chris\_Church1](https://forum.ansible.com/u/Chris_Church1)\
**Post date:** [July 21, 2015, 6:56pm UTC](https://forum.ansible.com/t/how-to-deploy-a-particular-git-branch-and-commit-id-using-ansible-git-module/18805/2 "2015-07-21T18:56:23Z")

</div>

Use the version option to specify a particular branch, tag or commit id. See [http://docs.ansible.com/ansible/git\_module.html](http://docs.ansible.com/ansible/git_module.html)
