# Plan pattern for in-git build of a bash command

**URL:** https://discourse.chef.io/t/plan-pattern-for-in-git-build-of-a-bash-command/19304
**Category:** Habitat Wiki
**Created:** [June 20, 2018, 6:05pm UTC](https://discourse.chef.io/t/plan-pattern-for-in-git-build-of-a-bash-command/19304 "2018-06-20T18:05:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chris1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/chris1/32/2143_2.png) [@chris1](https://discourse.chef.io/u/chris1)
#### Post date: [June 20, 2018, 6:05pm UTC](https://discourse.chef.io/t/plan-pattern-for-in-git-build-of-a-bash-command/19304/1 "2018-06-20T18:05:06Z")

</div>

I keep having to dig around my various plans for good patterns so I thought I'd start to just catalog my latest here

I just made a quick fly-by contribution to the `git-subtree` project and I think the plan here is a good template for a habitat plan that will be embedded in a repo for a shell command. It determines its version number dynamically from the state of git's HEAD and installs a bash command locked into a habitat-provided bash version:

> <https://github.com/dflydev/git-subsplit/pull/35>
