Create your GitLab account and first project, set up SSH keys so pushing just works, and connect new or existing repositories to GitLab.
Why: GitLab is a website that hosts your Git repositories — called "projects" in GitLab language — plus everything around them: code review, automated pipelines, and issue tracking. It does the same job as GitHub, with a stronger focus on built-in CI/CD and self-hosting. Note: two words to translate from GitHub — a repository is a project, and a pull request is a merge request (MR).
1. Sign up at https://gitlab.com — the free tier is plenty 2. Top bar → plus (+) → "New project/repository" → "Create blank project" 3. Pick a name and keep "Initialize repository with a README" checked
Your project now lives at https://gitlab.com/<username>/<project> Download a full copy of it onto your machine:
git clone https://gitlab.com/<username>/<project>.gitcd <project>Why: over HTTPS, GitLab asks for credentials on every push. An SSH key is a pair of files — a private half that stays on your machine and a public half you paste into GitLab — that authenticates you automatically. Set it up once and never type a password again.
Generate a key pair (press Enter through the prompts)
ssh-keygen -t ed25519 -C "you@example.com"Print the PUBLIC half — copy the whole line
cat ~/.ssh/id_ed25519.pubPaste it in GitLab: your avatar → Edit profile → SSH Keys → Add new key
Test the connection — GitLab should greet you by name
ssh -T git@gitlab.comFrom now on, clone with the SSH URL instead of HTTPS
git clone git@gitlab.com:<username>/<project>.gitWhy: your machine and GitLab each hold a full copy of the repository. git pull brings down what teammates pushed since you last looked; git push sends your commits up. Everything in between is the Git you already know.
Start the day by bringing down what changed on GitLab
git pull…edit files, then the loop from the Git course
git add .git commit -m "Describe the change"Send your commits up to GitLab
git pushWhy: a project that already exists on your machine doesn't need to be re-created in the browser — point it at GitLab with one remote add. Tip: GitLab even creates the project for you when you push to a URL that doesn't exist yet (called push-to-create).
Inside a repo you created locally with git init
git remote add origin git@gitlab.com:<username>/<project>.gitgit push -u origin mainPush-to-create: push to a project that doesn't exist yet and GitLab creates it on the fly
git push --set-upstream git@gitlab.com:<username>/new-project.git main