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:
bashgit 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:
bashgit log --oneline
If terminal show like that:
bashac64056 (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
- Click
New project
button:

- Click
create blank project
button:

- Fill all information:

- Click
Create project
button:

Push the codes into the Gitlab
- Add remote URL:

bashgit remote add origin git@gitlab.com:AnhBien/build2earn-fast-next15.git
Use this command to check add remote success:
bashgit remote -v
- Push code into the remote repo:
bashgit push origin main
or
bashgit push origin master
- After pushing:
