Steps to upload code to gitlab

Now I want to upload a project to gitlab, how to do it

1. Create an empty project on gitlab and choose a good name, for example: FirstProject

insert image description here

2. Copy the clone path

insert image description here

3. Create an empty folder locally, then open the console, switch to the folder, and enter the command

insert image description here

4. Prepare the project to be uploaded to this directory, and then enter the command in the console

git add .
git commit -m "first commit"
git push

5. If you want to push to another branch, you need to create a new branch on gitlab, then checkout, and then perform the operation in step 4

git checkout newBranch

Guess you like

Origin blog.csdn.net/ligaoyuan8030/article/details/128949355