# Checkout specific version of plugin?

**URL:** https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919
**Category:** Development
**Created:** [October 21, 2020, 10:18pm UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919 "2020-10-21T22:18:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![codechef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codechef/32/90261_2.png) [@codechef](https://meta.discourse.org/u/codechef)
#### Post date: [October 21, 2020, 10:18pm UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919/1 "2020-10-21T22:18:30Z")

</div>

Is there a way, inside of app.yml, to make rebuild checkout a specific version of a plugin?

I’m working on an older branch than master. When I `./launcher rebuild app` it pulls the latest version of a plugin that I don’t control. The latest version of that plugin isn’t compatible with the older version of discourse. This causes the build to fail in my test environment.

Ideally, I’m thinking something like the following in app.yml with the other plugins:

` - git clone https:/github.com/path/to/plugin.git?commit=ec64234359282`

I’m open to alternative solutions. Just need discourse to build with that version of the plugin.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [October 21, 2020, 11:11pm UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919/2 "2020-10-21T23:11:45Z")

</div>

You can use standard git options for that, like the `-b` flag.

---

<div class="post-metadata">

### Author: ![codechef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codechef/32/90261_2.png) [@codechef](https://meta.discourse.org/u/codechef)
#### Post date: [October 22, 2020, 12:37am UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919/3 "2020-10-22T00:37:38Z")

</div>

Unfortunately, the plugin doesn’t provide a named branch for the version I’m after. I’m trying to pull a specific revision (commit hash) from master. It doesn’t appear that -b works with commit hashes.

From the command line, I can `git clone` then `git checkout` to get what I need. Is there a ways to do that in app.yml?

---

<div class="post-metadata">

### Author: ![codechef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codechef/32/90261_2.png) [@codechef](https://meta.discourse.org/u/codechef)
#### Post date: [October 22, 2020, 1:07am UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919/4 "2020-10-22T01:07:29Z")

</div>

Okay, @Falco 's solution worked, but I had to go about it in a round about way.

1. I forked the original repo
2. Cloned it locally on my dev machine
3. Created my branch from the desired commit
  - `git branch foo ec64ae8`

4. Pushed that branch to my github
  - `git push -u origin foo`

5. Updated my app.yml with
  - `git clone -b foo git@github.com:my-repo.git`

Seems like there should be an easier way, but this gets the job done. Thanks for the direction @Falco !

---

<div class="post-metadata">

### Author: ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)
#### Post date: [January 6, 2022, 10:25pm UTC](https://meta.discourse.org/t/checkout-specific-version-of-plugin/167919/5 "2022-01-06T22:25:01Z")

</div>

Yeah, I’m testing out new plugins, especially the chat plugin, and noticed that it seemed to have broken on my site and am wondering how to just roll back to the previously installed version or even to manually type in the commit version I’d like.

I imagine going forward I’d love to see this in the upgrade dashboard, something like the “undo” button for upgrade, but for now, I’m hoping there could at least be a faster way than what seems to be a more brute-force effort you did to workaround it.
