Switching Branches

Applies to ReadyAPI 3.56, last modified on November 21, 2024

When you work with a Git repository, most likely, you have several branches. To switch between the branches within ReadyAPI, do the following:

Git integration in ReadyAPI: Selecting branch

Click the image to enlarge it.

  1. Click Git on the main toolbar.

  2. Select the needed branch from the list. If your project is connected to a remote repository, the list contains remote and local branches. Remote branches start with refs/remotes/, and local branches with refs/heads/.

    Click Create Branch to create a new local branch. ReadyAPI automatically switches to the created branch. To push the branch to a remote repository, push your changes.

Important notes:

  • This action will automatically save the project.

  • Your project should not contain uncommitted changes.

  • You cannot switch to a remote branch that already has a local snapshot. To get recent changes from the remote branch, select a local branch and pull the changes.

Create pull request

You can create a pull request only if your project is connected to the GitHub, Bitbucket or GitLab remote repository.

To create a pull request from ReadyAPI:

Git integration in ReadyAPI: Selecting branch

Click the image to enlarge it.

  1. Make sure you push all your commits to a remote branch.

  2. Click Create Pull Request. ReadyAPI opens the Create Pull Request page in your default web browser.

Note: ReadyAPI automatically adjusts the settings.xml (or any auto-updated file) based on factors like version changes. For example, if a project created on 3.49 is cloned to 3.50, ReadyAPI detects and switches the settings accordingly, altering the settings.xml file. However, subsequent commits won't trigger this behavior unless the project is pulled onto a different machine with a different ReadyAPI version. To address this behaviour, refer to Troubleshooting
  1. In ReadyAPI, right-click your project in the Navigator panel and select Git > Switch Branch from the context menu

    Show image

    — or —

    Select Project > Git > Switch Branch from the main menu.

    Show image

    Note: If the command is disabled, make sure you enabled integration with Git.

  2. The Switch Branch dialog will appear. In this dialog, you can view all remote and local branches.

    Git integration: Switch Branch Dialog
  3. Select the needed branch from the list and click OK.

See Also

Git Integration

Highlight search results