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
相关推荐
无人生还别怕19 小时前
搭建gitlab服务并接入openldap认证
git·gitlab·github·openldap·ldap·统一认证
*_潇_*1 天前
0095__日常--记一次gitlab Runner配置与CI/CD环境搭建流程
ci/cd·gitlab
开发者联盟league2 天前
在ubuntu上使用apt方式安装gitlab
linux·ubuntu·gitlab
张小凡vip2 天前
gitlab的ci配置文件yaml参数说明
git·ci/cd·gitlab
田里的水稻2 天前
OE_gitlab服务操作和维护方法
分布式·gitlab
puamac3 天前
GitLab CI/CD 指南
gitlab
Rain5093 天前
GitLab-Runner + AI 代码审查服务 + 远程大模型 全套部署运维实战
linux·运维·人工智能·python·ci/cd·gitlab·ai编程
puamac4 天前
gitLab CI/CD 执行流程说明
ci/cd·gitlab
维度跃迁笔记4 天前
2核4G轻量服务器部署GitLab实战:配置调优与CI/CD拆分方案
服务器·ci/cd·gitlab
Byron Loong5 天前
GitLab 全部权限角色详解
gitlab