When you work with a Git repository, most likely, you have several branches. To switch between the branches within ReadyAPI, do the following:
-
Click Git on the main toolbar.
-
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 withrefs/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:
-
Make sure you push all your commits to a remote branch.
-
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 |
Switch branch via the Git project menu
-
In ReadyAPI, right-click your project in the Navigator panel and select Git > Switch Branch from the context menu
— or —
Select Project > Git > Switch Branch from the main menu.
Note: If the command is disabled, make sure you enabled integration with Git.
-
The Switch Branch dialog will appear. In this dialog, you can view all remote and local branches.
-
Select the needed branch from the list and click OK.