Submit local files to the gitlab server

Submit to the existing project in gitlab

1. First find a place, use the git bash tool to clone the project to the local

2. Then put the file you want to submit in the clone project and keep it at the same level as the .git directory

3. Use git add * to submit to the buffer

4. Use git commit -m "xxx" to submit to the local library

5. Use git remote add origin http://ip address/shiyan/FAQ.git
    if an error is reported: fatal: remote origin already exists., use the git remote rm origin command to delete origin, and then execute git remote add origin http:/ /ip address/shiyan/FAQ.git

6.git push -u origin master
   submitted to the master branch

Submit files or folders to the newly created project in gitlab

1.git init 
2. If you submit a file, use: git add file name, if you submit a folder and file, use: git add * 
3.git commit -m "first commit" 
4.git remote add origin git@ip address :Path/xxx.git 
5.git push -u origin master

Note that empty folders will not be submitted to gitlab

 

Guess you like

Origin blog.csdn.net/qq_39839828/article/details/113662370