# Can't push local branch to staging

**URL:** <https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154>\
**Category:** Help me!\
**Created:** [April 5, 2023, 12:36pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154 "2023-04-05T12:36:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_Free](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/carl_free/32/5934_2.png) [@Carl\_Free](https://community.forestadmin.com/u/Carl_Free)\
**Post date:** [April 5, 2023, 12:36pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/1 "2023-04-05T12:36:00Z")

</div>

## Feature(s) impacted

I am not able to push my local branch with `forest push` to Staging.

## Observed behavior

Error: Failed to push branch: Source and destination environments must have the same schema. Please check your environments code is synchronized.

I have checked on Heroku and the two forest schema are the same.

## Context

- Project name: Hubflo
- Team name: Admin
- Environment name: Development
- Agent (forest package) name & version: forest\_liana (7.6.7)
- Database type: Postgres
- Recent changes made on your end if any: Add smart actions
- Forest env secret last 5: acaf25

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [April 5, 2023, 1:07pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/2 "2023-04-05T13:07:23Z")

</div>

Hi @Carl_Free 👋 as I can see on our datas, the secret env you are using is the one of the environment named `Development | carlquivron` and yeah there are many difference between `Staging`.  
If you want to push `Development` to `Staging` you must use the env secret finished by `9e0b6`.  
Please let me know if that help 🙏

---

<div class="post-metadata">

**Author:** ![Carl\_Free](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/carl_free/32/5934_2.png) [@Carl\_Free](https://community.forestadmin.com/u/Carl_Free)\
**Post date:** [April 5, 2023, 1:25pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/3 "2023-04-05T13:25:06Z")

</div>

Hi Arnaud, thanks for your answer.

Yes this is my local env. If you say that there are a lot of differences, maybe it means that the Staging schema isn’t automatically apply ?

::EDIT::  
It’s all good, my staging schema wasn’t applied on Staging env !  
I just run `FOREST_ENV_SECRET=SECRET forest schema:apply` and it’s working!

Thanks !!!

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [April 5, 2023, 1:46pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/4 "2023-04-05T13:46:11Z")

</div>

Happy to hear that. Can I mark this thread as resolved?

---

<div class="post-metadata">

**Author:** ![Carl\_Free](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/carl_free/32/5934_2.png) [@Carl\_Free](https://community.forestadmin.com/u/Carl_Free)\
**Post date:** [April 5, 2023, 2:41pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/5 "2023-04-05T14:41:04Z")

</div>

Yes, thanks!

Do you have a documentation to automatically apply schema after an Heroku build ?

Thanks

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [April 5, 2023, 3:17pm UTC](https://community.forestadmin.com/t/cant-push-local-branch-to-staging/6154/6 "2023-04-05T15:17:02Z")

</div>

The schema should be send automatically when you start your agent if you versioned it.
