Releases And Snippets

Branch Merging | Feature Announcement

Summary

Hey there! In this blog post, we're going to dive into Xano's brand new branch merging features, which are a total game-changer for backend development. These features are especially useful when you're iterating on features or working with a team, providing a more traditional development environment within Xano's no-code platform.

What is Branch Merging?

Branch merging is a concept that allows you to create separate branches of your codebase, make changes in isolation, and then merge those changes back into the main branch (often called the "master" or "production" branch). This workflow is common in traditional software development, and it helps teams collaborate more effectively, test new features without impacting the live application, and manage code changes in a organized manner.

Setting Up Branches in Xano

Let's start by creating a new branch in Xano. Here's how you do it:

  1. In the left-hand menu, click on "Add New Branch."
  2. You'll be prompted to either start from an existing branch or create a new empty branch. For this example, we'll use our existing "V1" branch as the base.
  3. Give your new branch a name (e.g., "V2") and click "Create."

Now you have a separate branch where you can make changes without affecting your live APIs.

Making Changes in Your Branch

With your new branch created, you can start making changes to your APIs, functions, tasks, or add-ons. Let's make a simple change to an existing API endpoint:

  1. Navigate to the API endpoint you want to modify.
  2. Click into the endpoint and add a new step (e.g., "Create Variable").
  3. Click "Save" to save your changes.
  4. Click "Publish" to ensure your changes are published to the branch.

Merging Branches

Once you've made and published your changes in your new branch, it's time to merge those changes back into your main branch. Here's how:

  1. In the left-hand menu, click "Merge Branches."
  2. Select the branch that contains your changes as the "Source" branch (e.g., "V2").
  3. Select the branch you want to merge into as the "Destination" branch (e.g., "V1").
  4. Review the list of functions, tasks, add-ons, and API endpoints that have changes. Deselect any items you don't want to merge by clicking the icon on the right-hand side.
  5. Click "Publish" to complete the merge.

Xano will now merge your changes from the source branch into the destination branch. You can switch back to the destination branch and verify that your changes have been applied successfully.

Handling Drafts During Merges

One important thing to note is that Xano will not allow you to merge branches if there are drafts (unpublished changes) in either the source or destination branch. If you attempt to merge branches with drafts, you'll see a warning message.

To resolve this, you have two options:

  1. Publish any drafts in the source or destination branch before attempting the merge.
  2. Deselect any items with drafts during the merge process by clicking the icon on the right-hand side.

By providing granular control over which items are merged, Xano ensures that you don't accidentally publish drafts or overwrite work in progress.

Conclusion

Xano's new branch merging features bring a level of flexibility and collaboration to the no-code backend development process. Whether you're working solo or with a team, these features will help you iterate on features, test changes in isolation, and manage your codebase more effectively. Give them a try and let us know what you think!

If you have any questions or need further assistance, feel free to leave a comment below, reach out to us via the support chat in Xano, or join the Xano community. Happy coding (or no-coding)!

This transcript was AI generated to allow users to quickly answer technical questions about Xano.

Was this helpful?

I found it helpful

I need more support
Sign up for XanoSign up for Xano

Build without limits on a secure, scalable backend.

Unblock your team's progress and create a backend that will scale for free.

Start building for free