Lessons › Domain 6: Managing Applications (10%) › Lesson 21
Source Control with Git
About 14 minutes · Last checked against the CAD blueprint (January 2026): 4 December 2026
Step 1 · Learn
Versioning applications in Git
An application on a non-production instance can be linked to a Git repository. Its files are then saved in the repository, where changes are versioned and shared between developers and instances.
Linking
- Create the repository at a Git provider, and a credential on the instance.
- In ServiceNow Studio, use Link to source control with the repository URL and credential. This needs the admin role.
- The instance needs network access to the repository, through a MID Server if the repository is internal.
Operations
| Operation | What it does |
|---|---|
| Commit changes | Sends local application changes to the repository |
| Apply remote changes | Updates the instance's application to match the repository |
| Create branch | Starts a separate line of development, such as a new feature |
| Switch branch | Changes which branch the instance works on |
| Create tag | Marks a specific version, such as a release |
| Stash local changes | Sets local changes aside so you can return to them later |
| Import from source control | Brings an application from a repository onto another instance |
Collaborating
Other developers only see changes after they are committed. A typical routine is: apply remote changes, make your changes, commit them, and use branches so work in progress does not disturb others. Review and merge branches at the Git provider.
Step 2 · Do
Put the loans application in Git
Link the loans application to Acme's Git repository and work with a colleague. This is a practice environment of our own design, not the ServiceNow product. Complete the tasks in the task list.
Step 3 · Check
Exam-style questions
Select an answer and check it. Every answer includes an explanation.