logo image
  • Introduction

    • Getting started
  • 01 Ideas

    • Thinking about the ideas
    • Validate the ideas
    • The simplest and smallest MVP
    • Tools to manage tasks, docs
  • 02 Build MVP fast

    • Install NextJs code template
    • Setup your brand
    • Store code on the Gitlab
    • Setup MongoDB
    • Setup Authentication

    • Explore all components
    • Update lang, font family base on your country
  • 03 Release product

    • Add your domain
    • Create a brand logo and favicon.ico
    • Update lang, font family, title and description meta
    • Prepare all production environment variables
  1. Home
  2. Build Mvp Docs
  3. Build
  4. Store Codes Gitlab

02 Build MVP fast

How to Store Source Code on GitLab: A Step-by-Step Guide

GitLab is a web-based DevOps platform that streamlines software development with tools like version control, CI/CD, and project management. It enables secure code storage and team collaboration. Trusted by developers worldwide, GitLab is ideal for projects of any size.


Init Git

Open your terminal in your current source code then run this command:

bash
git init

Notes: If you create a new nextjs project by automatic my Vercel official, your source code will be automatic initialize the Git. By check it, you can use this command to show all logs of commits:

bash
git log --oneline

If terminal show like that:

bash
ac64056 (HEAD -> main) chore: Add Prettier formatting a993f9f chore: Fix ignore Eslint in config file d56b3fc chore: Update Eslint config 414a690 Initial commit from Create Next App

So you do not need use git init command to initialize the source code

Create a new project on Gitlab

  1. Click New project button:
create a new Gitlab project
  1. Click create blank project button:
create a new Gitlab project
  1. Fill all information:
create a new Gitlab project
  1. Click Create project button:
create a new Gitlab project

Push the codes into the Gitlab

  1. Add remote URL:
create a new Gitlab project
bash
git remote add origin git@gitlab.com:AnhBien/build2earn-fast-next15.git

Use this command to check add remote success:

bash
git remote -v
  1. Push code into the remote repo:
bash
git push origin main

or

bash
git push origin master
  1. After pushing:
create a new Gitlab project
Previous
Setup your brand
Next
Setup MongoDB

On this page

  1. Init Git

  2. Create a new project on Gitlab

  3. Push the codes into the Gitlab