gitLab上传项目代码

在gitlab上创建项目后,没有显示仓库菜单,也看不到分支信息

这时,需要在本地创建好项目代码,然后在在项目代码的文件夹下,右键点击,使用git命令执行如下命令

复制代码
Git global setup
git config --global user.name "wanga xiaofei"
git config --global user.email "1401431383@qq.com"

Create a new repository --克隆空代码到本地以及生成远程的主分支
git clone http://39.162.1.200:15001/13213161636/cs.git
cd cs
git switch -c main
touch README.md
git add README.md
git commit -m "add README"
git push -u origin main

Push an existing folder --推出本地项目代码
cd existing_folder
git init --initial-branch=main
git remote add origin http://39.162.1.200:15001/13213161636/cs.git
git add .
git commit -m "Initial commit"
git push -u origin main

Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin http://39.162.1.200:15001/13213161636/cs.git
git push -u origin --all
git push -u origin --tags
相关推荐
有理想的打工人1 天前
gitlab的参数设置与团队管理
gitlab
有理想的打工人1 天前
gitlab群组管理与ssh链接
ssh·gitlab
M-Ellen1 天前
从零搭建 Windows + WSL2 + Docker + GitLab CI/CD 完整手册
ci/cd·docker·gitlab
大脸胖柴2 天前
webStorm+gitLab操作学习
学习·gitlab·webstorm
jekc8683 天前
Ubuntu-GitLab
服务器·ubuntu·gitlab
在路上走着走着4 天前
openclaw v2026.4.5 版本 提示 pairing required 解决方案
gitlab
Gazer_S8 天前
【GitLab npm Registry 非标准端口安装问题解决方案】
前端·npm·gitlab
-KamMinG8 天前
Gitlab版本升级方案-13.x到17.x
gitlab
菜鸡000110 天前
把一个项目传到 GitLab 的某个群组
大数据·elasticsearch·gitlab
AlbertS11 天前
记一次推送lfs失败不能迁移git仓库到新的gitlab的问题
git·ai·gitlab·lfs·rejected