← All topics

What is git hosting?

Who changed this calculation, and why? Git hosting gives your team a shared code history where it can look up the answer.

Local work and a shared history

Git tracks changes to files in a repository. That history also lives on your own machine. Git hosting keeps a repository on a server that authorized members of your team can access.

A commit records a state of your work. Pushing transfers your commits to the host; pulling brings changes back and integrates them locally. Saving a file alone does not transfer any code. The team can refer to a shared version while everyone continues working locally.

Reviewing a change before it reaches main

GitLab and GitHub display differences between code versions, their commits and review comments. A branch keeps a change separate from the shared main branch, main. A merge request in GitLab or a pull request in GitHub lets the team discuss that change before merging it.

For an invoice rounding change, a reviewer can check whether the code rounds each line or only the final total. A comment explaining the expected result and a suitable test make that decision easier to understand later. History helps locate the relevant commit; the team still needs to record its reasoning.

Which version starts the pipeline

In the documented MainPath workflow, a push to main starts the pipeline. It checks and builds that version, then publishes it to dev. Production follows through a manual production job. Code that has only been saved or committed locally has not been published.

Your team decides whether to push directly to main or review changes through merge requests first. Feature branches run through the pipeline without a deployment. See Git workflow and deployment for the steps.

Repository access and credentials

The host controls who can read or change a repository. Automated processes can authenticate with tokens or deploy keys. Keep these credentials out of code and review comments. If a token is exposed, revoke and replace it with the provider; deleting it from the current file does not remove it from earlier commits.

Where MainPath keeps repositories

MainPath uses its own GitLab by default, with a repository for each component. The project overview links to these repositories. A project can also use GitHub or GitLab.com with the appropriate connection; GitHub credentials and GitLab credentials cover setup and requirements.

Save and publish explains how to transfer your own changes and publish them.

Thank you for your request

We have received your request and will get back to you as soon as possible.

Would you like to talk to us directly?

Choose a time here for an introductory call with Robin.

Open the calendar in a new tab