Initialize a Git repository with the ServiceNow IDE

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 3분
  • Initialize a local Git repository for an application and push it to a remote Git repository to manage an application in source control.

    시작하기 전에

    Role required: admin

    이 태스크 정보

    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.

    프로시저

    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 (Source Control).
    4. Select Initialize Repository or use the Git: Initialize Repository command from the command palette.
    5. Select the application for which you want to initialize a Git repository and press Enter.
    6. Select main as the default branch name or enter another name and press Enter.
    7. Select the Stage All Untracked Changes icon (Stage all untracked changes).
    8. Enter a commit message and select the Commit icon (Stage all untracked changes).
    9. Select the More actions menu icon (More actions) and select Push.
    10. Enter a remote repository URL and press Enter.

    결과

    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.

    다음에 수행할 작업

    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.