Basic Workflow

Remote Repository

In order to use Gitlab, the files for a project should be stored in a folder. This folder is known as a repository (or repo for short). Ultimately, the repository will be backed up to the cloud on Gitlab’s servers. This cloud repository is known as the remote repository.

A folder in the cloud is labeled "Remote".

Local Repo / Clone

To work on a project, you’ll usually want to download the repository to your computer. The repository on your computer is known as the local repository, and the action of copying the remote repository to your computer is known as cloning.

An arrow points from a repository in the cloud to a repository on a computer. The arrow is labeled "clone".

Commits

As you make changes to your project, you’ll want to periodically save and document your work. When you do so, git takes a snapshot of the project and saves that snapshot to the project’s version history. Each of these snapshots is known as a commit, and we often use commit as a verb to indicate making one of these saves.

An arrow points from a version of a project to an updated version. The arrow is labeled "commit".

Push

At this point, the commits are only stored on your local computer. After making a few commits, you’ll want to upload your changes back to the remote repository. (This will ensure that your work is backed up and that the remote repository is up to date). The action of uploading your commits to the remote repository is known as a push.

An arrow points from an updated project on a computer to an copy of the updates on the cloud. The arrow is labeled "push".

Additional Commits and Pushes

It’s worth noting that you only need to clone the repository once. Once you have a local copy, git will track all the changes you make, so you can continue to make additional commits and pushes quickly and efficiently.

A second update is committed on the local repository and then pushed to the cloud.