Create versions and branches in Git
App developers using ServiceNow Studio can create versions and branches in their Git repositories.
Create a tag to link to a particular application version
Create a tag in the repository to link to a particular app version in ServiceNow Studio.
始める前に
Link an app to source control in ServiceNow Studio
Role required: admin or sn_group_creator.app_creator
手順
- Navigate to .
- In the file navigator, select the application you want to open.
- Select App details to open the app in the canvas.
- Select .
- Enter the Tag name.
- Select Create tag.
- Select Close.
次のタスク
Switch repository branches
Application developers can switch to a different repository branch to work on another version of the application using ServiceNow Studio.
始める前に
You must have a Git repository with one or more available branches.
Role required: admin
手順
- Navigate to .
- In the file navigator, select the application you want to open.
- Select App details to open the app in the canvas.
- Select .
-
Choose whether you want to stash or discard local changes.
Option Description Stash local changes Saves local changes before switching to an alternate branch. You can later merge or discard the saved changes. Discard local changes Permanently deletes all local changes before switching to an alternate branch. If you choose to discard, you will not be able to recover those files. 注:Use caution when discarding local changes. Since all application developers share repository credentials, there is no way to discard just one set of user changes. - Select the branch you want to switch to.
- Select Switch Branch.
タスクの結果
ServiceNow Studio updates the local application to match the branch version from repository.
Create a repository branch
Application developers can create a branch to work on a new version of an existing app in ServiceNow Studio. Creating a branch will result in a new branch being created in the remote repository that is configured for this application. This application, including any uncommitted changes, will switch to the new branch.
始める前に
Role required: admin or sn_group_creator.app_creator
手順
- Navigate to .
- In the file navigator, select the application you want to open.
- Select App details to open the app in the canvas.
- Select .
- Enter a Branch name.
- オプション: Create a branch from a tab by selecting the Create from Tag drop-down list and selecting an existing tag.
- Select Create Branch.
- Select Close.
Set a default branch
Set a default branch when you want to use a branch other than main for new changes or for your main ServiceNow Studio development repository.
始める前に
Link an app to source control in ServiceNow Studio
Role required: admin