> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/administer/use-source-control-and-environments.md).

# Use source control and environments

Overview of source control and environments in n8n

{% hint style="info" %}
**Feature availability**

* Available on Business and Enterprise plans.
* You must be an n8n instance owner or instance admin to enable and configure source control.
* Instance owners and instance admins can push changes to and pull changes from the connected repository.
* Project admins can push changes to the connected repository. They can't pull changes from the repository.
  {% endhint %}

n8n uses Git-based source control to support environments. Linking your n8n instances to a Git repository lets you create multiple n8n environments, backed by Git branches.

## In this section

* [Understand source control](/administer/use-source-control-and-environments/understand-source-control.md): how source control and environments work in n8n.
* [Work with environments](/administer/use-source-control-and-environments/work-with-environments.md): the purpose of environments, and how they work in n8n.
* [Use Git in n8n](/administer/use-source-control-and-environments/use-git-in-n8n.md): how n8n uses Git.
* [Choose branching patterns](/administer/use-source-control-and-environments/choose-branching-patterns.md): the possible relationships between n8n instances and Git branches.
* [Set up source control](/administer/use-source-control-and-environments/set-up-source-control.md): how to connect your n8n instance to Git.
* [Push and pull changes](/administer/use-source-control-and-environments/push-and-pull-changes.md): send work to Git, and fetch work from Git to your instance.
* [Compare versions](/administer/use-source-control-and-environments/compare-versions.md): use workflow diffs to compare local and remote changes.
* [Move work between environments](/administer/use-source-control-and-environments/move-work-between-environments.md): how to copy work between different n8n instances.
* [Use environments programmatically with the public API](/administer/use-source-control-and-environments/use-environments-via-api.md): preview, push, and pull source control changes using the n8n public API.
* [Tutorial: Create environments with source control](/administer/use-source-control-and-environments/tutorial-create-environments-with-source-control.md): an end-to-end tutorial, setting up environments using n8n's recommended configurations.

## Related sections

* [Variables](/build/code-in-n8n/define-custom-variables.md): reusable values.
* [External secrets](/administer/manage-credentials/use-external-secret-stores.md): manage credentials[^1] with an external secrets vault.

## Related resources

* [Administer](/administer/readme.md)
* [Manage users and access](/administer/manage-users-and-access.md)
* [Manage credentials](/administer/manage-credentials.md)
* [Observe and log](/administer/observe-and-log.md)

[^1]: In n8n, credentials store authentication information to connect with specific apps and services. After creating credentials with your authentication information (username and password, API key, OAuth secrets, etc.), you can use the associated app node to interact with the service.
