How can we merge the main branch into the feature branch to get the latest changes?

Hello!

Our team is planning to implement Source Control for our apps as part of our new development process. However, we still have a question regarding how to merge changes from the main branch into our feature branch.

I have tried two different approaches:

  1. Merging main into the feature branch directly through GitHub:
    I decided to merge the main branch into my feature branch because my feature branch did not contain the changes that were in the main branch. I created a pull request on GitHub and merged it since there were no conflicts. Although I could see the changes reflected in my feature branch on GitHub, they were not visible in the Retool UI.

  2. Using the "Reset Branch" feature:
    I came across a post by my colleague (How can we integrate a staging environment into the deploy flow with Source Control?) and decided to try the "Reset Branch" option. This approach seemed effective because, after resetting the branch, I could see the changes from the main branch reflected in my feature branch. However, I encountered a problem: all the changes I had made prior to resetting my feature branch were lost, even though I had committed them. I had assumed I could retrieve them after the reset.

So, is there a reliable way to pull changes from the main branch into the feature branch, or is this not currently supported?

Thanks in advance!

2 Likes

Hi @Tatsiana_Shurakova! Thanks for reaching out.

This is definitely something that we are planning to address in the relatively near future, as it's not well supported using the existing tools. It is possible, though, using a combination of the approaches that you've described above.

The recommended strategy is to merge main into feature directly through GitHub and then use the "Reset Branch" option within Retool to sync the remote feature branch with the local version!

It's not super intuitive, but that should do the trick. Let me know if you have any questions!

1 Like