Initialize a Git repository
Initialize a local Git repository for an application in ServiceNow Studio and push it to a remote Git repository to manage an application in source control.
Before you begin
- Create or convert an application with ServiceNow Studio. For more information, see Create an application in ServiceNow Studio or Convert an application to Fluent.
- Create a dedicated Git repository for the application from your Git provider.
- Set your basic or OAuth 2.0 credentials for ServiceNow Studio to connect to your Git repository. For more information, see Connect to a Git provider using basic authentication and Connect to a Git provider using OAuth 2.0.
Role required: admin
About this task
An application on an instance can be connected to only one repository at a time. To clone an application that exists in a remote Git repository, see Clone a Git repository from ServiceNow Studio.
Procedure
- Navigate to .
- Open a workspace with an application that isn't connected to a Git repository.
- Select the Changes tab in the Navigator panel.
- Select Initialize Repository or use the Git: Initialize Repository command from the command palette.
- Select the application for which you want to initialize a Git repository and press Enter.
- Select main as the default branch name or enter another name and press Enter.
-
Select the stage all untracked changes icon
.
-
Enter a commit message and select the commit icon
.
-
Select the more actions menu icon
and select Push.
- Enter a remote repository URL and press Enter.
Result
The application is available in the remote repository.
What to do next
Check out or create branches in the repository and push changes to the remote repository. For more information, see Using Fluent source control in ServiceNow Studio.