# Version controlling a plugin?

**URL:** <https://discourse.cakephp.org/t/version-controlling-a-plugin/9163>\
**Category:** Need Help\
**Tags:** help\
**Created:** [March 25, 2021, 8:08pm UTC](https://discourse.cakephp.org/t/version-controlling-a-plugin/9163 "2021-03-25T20:08:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/alex/32/2375_2.png) [@alex](https://discourse.cakephp.org/u/alex)\
**Post date:** [March 25, 2021, 8:08pm UTC](https://discourse.cakephp.org/t/version-controlling-a-plugin/9163/1 "2021-03-25T20:08:26Z")

</div>

Hi everyone,

I’m getting familiar with plugins and just created my first one under `APP/plugins/MyPlugin`.

Since the point of CakePHP plugins is to be [pre-packaged and reusable in other CakePHP applications](https://book.cakephp.org/3/en/plugins.html), I’m thinking to version-control it somehow, but it already got tracked by the parent APP’s git because the `plugins` folder isn’t `.gitignore`'d.

I’m guessing this is the intended behaviour? If I plan for my plugin to be internally reusable in my other CakePHP apps, should I somehow put it into `vendor` instead? Or should I simply add `APP/plugins/MyPlugin` to `.gitignore`?

**UPD** oh, and if the answer is to put it under `vendor`, then is there even a way to do that with a private repository hosted with Bitbucket or Amazon CodeCommit?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [March 25, 2021, 10:30pm UTC](https://discourse.cakephp.org/t/version-controlling-a-plugin/9163/2 "2021-03-25T22:30:02Z")

</div>

Yes, if you want it to be usable in other projects, you probably want to put it in its own repository. Composer is quite capable of `require`-ing things that are in private repositories.
