# Specify SHA when "Preparing working directory" when running plugin

**URL:** <https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409>\
**Category:** General\
**Created:** [November 21, 2022, 9:49pm UTC](https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409 "2022-11-21T21:49:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saj](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@saj](https://forum.buildkite.community/u/saj)\
**Post date:** [November 21, 2022, 9:49pm UTC](https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409/1 "2022-11-21T21:49:32Z")

</div>

I want the “Preparing working directory” to checkout a particular commit so that a specific version of a file is available when the relevant plugin runs. Is there a way to do so? I’ve tried adding BUILDKITE\_COMMIT but it doesn’t appear to override the original value. Thanks!

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [November 22, 2022, 12:15pm UTC](https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409/2 "2022-11-22T12:15:41Z")

</div>

Hey @saj!

Not sure I quite get your use case 🤔. You have a particular file version that you need to use in a plugin, is that right? If you have something (a file in this case) that shouldn’t change between runs, then using an artifact it’s the best option.  
As you mentioned, you can’t override BUILDKITE\_COMMIT.

Best!

---

<div class="post-metadata">

**Author:** ![saj](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@saj](https://forum.buildkite.community/u/saj)\
**Post date:** [November 22, 2022, 2:13pm UTC](https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409/3 "2022-11-22T14:13:41Z")

</div>

Hi Paula,

To expand a bit more, the pipeline in question is setting up two instances to perform an automated analysis. The plugin we’re using currently references a local configuration file, but this file needs to match the version being deployed. I was hoping there was a way to override the branch that the “prepare working directory” step checks out to resolve my particular issue. I think I’ll try to checkout the branch prior to calling the plugin instead and skip the checkout as mentioned [here](https://forum.buildkite.community/t/how-do-i-skip-the-preparing-working-directory-step/468).

---

<div class="post-metadata">

**Author:** ![saj](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@saj](https://forum.buildkite.community/u/saj)\
**Post date:** [November 22, 2022, 9:09pm UTC](https://forum.buildkite.community/t/specify-sha-when-preparing-working-directory-when-running-plugin/2409/4 "2022-11-22T21:09:37Z")

</div>


