# Set up Source Control
URL: https://docs.awellhealth.com/docs/data/set-up-source-control

> For the complete documentation index, see [llms.txt](https://docs.awellhealth.com/llms.txt).



The setup is the same for both providers apart from creating the access token. Start with a **new,
dedicated repository** rather than an existing one: it keeps the sync clean and the history entirely
about this care flow.

## Connect the repository, then test before saving [#connect-the-repository-then-test-before-saving]

### 1. Create a new Git repository [#1-create-a-new-git-repository]

Create a dedicated repository for Awell's Source Control.

### 2. Enter the repository URL into Awell [#2-enter-the-repository-url-into-awell]

Paste the repository URL into the care flow's Source Control settings.

### 3. Set the branch name [#3-set-the-branch-name]

Specify the branch Awell should sync to.

### 4. Create an access token [#4-create-an-access-token]

See below.

### 5. Copy the generated token into Awell [#5-copy-the-generated-token-into-awell]

Paste the token into the token field in Awell.

### 6. Test and save [#6-test-and-save]

GitLab offers a **Test Source Control** action. Test the configuration before saving on either provider;
otherwise a wrong token isn't discovered until publish time.

## The token is the one step that differs by provider [#the-token-is-the-one-step-that-differs-by-provider]

### GitHub [#github]

Create a **fine-grained personal access token** with access to the new repository.

Fine-grained tokens can be scoped to a single repository, so use that rather than a classic token with
broad access.

### GitLab [#gitlab]

Create a **personal access token** with access to the repository.

## After setup, every publish triggers a sync [#after-setup-every-publish-triggers-a-sync]

The care flow syncs to the repository each time a new version is published. See
[How syncing works](/docs/data/syncing-to-scm) for what that does and doesn't mean.

## Next steps [#next-steps]

**Next:** [How syncing works](/docs/data/syncing-to-scm).
