# What is git hosting?

Git hosting is where the repositories live. The pipeline starts from there.

> Source: https://www.mainpath.ai/en/wiki/git-hosting/

## What it is

Git keeps the history of your code on your machine. Git hosting is the server where that history lives for everyone. Locally you have a copy. A push brings commits there. A pull fetches what others have pushed.

Local is a copy. The host is the place where it is settled what is on main, and what the pipeline starts from.

## What it is made of

Without that place there is no shared history. Everyone works in their own folder, and merging becomes a file someone sends by mail. With hosting there are branches, merge requests, and one place where it is clear what is on `main`.

## What goes wrong

The pipeline starts from there too. A push to `main` is the signal: this state should be checked, built, and shipped. If the code only lives locally, nothing happens after you save, except on your disk.

## What you otherwise look after yourself

Access belongs to it. Not every account may write to every repository. Deploy keys and tokens are access for the pipeline, not for people. A token in chat or in the repository is an access you cannot take back once it is in the history.

## How it shows up on MainPath

On MainPath every building block has a repository in GitLab. How saving and publishing fit together is described under [Save and publish]({{< relref "/docs/save-and-publish" >}}).

