Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Initialize a Git repository with the ServiceNow IDE

Initialize a local Git repository for an application and push it to a remote Git repository to manage an application in source control.

Before you begin

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 with the ServiceNow IDE.

Procedure

  1. Navigate to All > App Development > ServiceNow IDE.

  2. Open a workspace with an application that isn't connected to a Git repository.

  3. From the Activity Bar, select the Source Control view (

Image omitted: servicenow-ide-source-control-icon.png
Source Control\).
  1. Select Initialize Repository or use the Git: Initialize Repository command from the command palette.

  2. Select the application for which you want to initialize a Git repository and press Enter.

  3. Select main as the default branch name or enter another name and press Enter.

  4. Select the Stage All Untracked Changes icon (

Image omitted: servicenow-ide-stage-icon.png
Stage all untracked changes\).
  1. Enter a commit message and select the Commit icon (
Image omitted: servicenow-ide-commit-icon.png
Stage all untracked changes\).
  1. Select the More actions menu icon (
Image omitted: servicenow-ide-more-actions-icon.png
More actions\) and select **Push**.
  1. Enter a remote repository URL and press Enter.

Result

The application is available in the remote repository.

If your Git credentials aren't configured or are inactive, the application isn't pushed to the remote repository. When prompted to configure your credentials, select Configure to configure your Git credentials and then try again.

What to do next

You can check out or create branches in the repository and push changes to the remote repository. For more information, see Using source control in the ServiceNow IDE.

Parent Topic:Integrating source control with the ServiceNow IDE

Related topics

Connect to a Git provider using basic authentication with the ServiceNow IDE

Connect to a Git provider using OAuth 2.0 with the ServiceNow IDE

Configure a MID Server to use source control with the ServiceNow IDE

Using source control in the ServiceNow IDE