The easiest way to use GitLab

Introduction to GitLab

GitLab is an open source platform based on the Git version control system, used for code hosting, continuous integration, and collaborative development. It provides a complete set of tools to help development teams work together, manage and deploy code.
GitLab is often used to manage code within the enterprise, and record the steps to push local code to GitLab.

1. Log in to your GitLab account and create a new blank project

Insert image description here
Insert image description here

2. Install git on your local computer, generate an ssh key, and copy the public key to gitLab's ssh key option

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Replace "[email protected]" with your email address. Enter your password as prompted or just press Enter to leave the password blank. This will generate an SSH key pair

3. Set user connection information globally

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Replace "Your Name" and "[email protected]" with your name and email address.

4. Use http to clone the created GitLab repository locally.

 git clone http://192.168.11.102:20528/wzl/mss-v1.0.git

http://192.168.11.102:20528, replace it with the content in your personal url

5. Copy the local code to the GitLab repository pulled from the remote and submit the code

git add .
git commit -m "Your commit message"

6. Push the code to the remote GitLab repository

git push 

Guess you like

Origin blog.csdn.net/qq_38716929/article/details/132901180