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.
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.
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.
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.
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.