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
相关推荐
三天不学习13 小时前
GitLab Docker 安装完整配置项说明
docker·容器·gitlab
一念一花一世界2 天前
Arbess从初级到进阶(9) - 使用Arbess+GitLab实现C++项目自动化部署
c++·ci/cd·gitlab·arbess
X***48962 天前
GitLab
gitlab
一世一生命2 天前
GitLab Package依赖管理:从 Dependabot 到 Renovate 的迁移实践和两者对比
gitlab
t***L2662 天前
GitLab API使用实例
运维·gitlab
x***B4113 天前
GitLab Runner配置教程
gitlab
9***Y483 天前
GitLab CI/CD配置教程
ci/cd·gitlab
y***54883 天前
GitLab CI缓存配置
缓存·ci/cd·gitlab
p***c9493 天前
GitLab CI/CD变量
git·ci/cd·gitlab
O***p6043 天前
GitLab CI/CD自动化部署实践
ci/cd·自动化·gitlab