Git workflow and branching model
How the Git Integration tracks SnapLogic assets, and the branching model SnapLogic recommends.
The Git Integration tracks your SnapLogic assets, such as pipelines, tasks, and accounts, in a Git repository. Tracking gives you a history of every change, a way to review work before it reaches production, and a way to return to an earlier version of a project. If you're new to Git, refer to Git terms for definitions of the terms used in the SnapLogic Git Integration documentation.
Most teams use at least two SnapLogic environments: one for development and testing, and one for
production. The Git repository connects them. Developers work in the development environment and
merge tested, approved work to the main branch in your Git provider, because
SnapLogic doesn't merge branches. Someone then pulls the main branch into the
production environment.

Trunk-based development
How a team organizes its branches is a branching model. The two common models are trunk-based development and Gitflow.
SnapLogic recommends trunk-based development for SnapLogic assets. One long-lived branch, the
main branch, holds the current state of the project. Create every other branch
directly from it, keep each one short-lived, and merge it back as soon as the work passes review.
Fewer branches exist at any one time, so there's less to merge and less to go wrong.

To release a version, check out the main branch and add a tag. The tag marks the latest commit on that branch. A released version doesn't
change afterward. To correct a problem in a released version, make the fix on a branch from the
main branch, merge it, and add a new tag.
Gitflow adds a second long-lived branch for work in progress, and keeps release branches alongside it. The Git Integration supports Gitflow, but it's a more complex process with features that most SnapLogic projects don't need. For more about the model SnapLogic recommends, refer to general information on Trunk-based development.
Single developer or multiple developers
Both workflows start the same way, with the repository, optional secrets-manager credentials, and the endpoint accounts in your sandbox environment. They differ in how many branches exist at the same time and in who merges them:
- Git workflow for a single developer: one developer creates a branch from the
mainbranch, commits the work, opens a pull request, merges it, and tags the release. - Git workflow for multiple developers: each developer works in their own project on their own
branch. An admin reviews the pull requests and merges them to the
mainbranch, which triggers the automated delivery to production.
Git terms
This page uses the following Git terms:
- Repository
- The store that holds your project files and their history. Check out a repository for a single project, or for selected projects in a project space.
- Branch
- A named line of work. Create a branch to make changes without affecting what anyone else is doing.
- Commit
- A set of saved changes, with a message describing them.
- Pull request
- A request to merge one branch into another, which your team reviews before accepting.
- Tag
- A permanent label on one point in a branch's history. Tags mark the versions you release.
- Main branch
- The branch that holds reviewed, approved work. Your production environment pulls from this branch.