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
相关推荐
牛奶咖啡131 天前
Git实践——GitLab服务器的部署与使用
gitlab·gitlab是什么·gitlab有啥用·gitlab适用场景·gitlab的版本如何选·安装部署gitlab·gitlab的使用
lisanmengmeng2 天前
Gitlab搭建
gitlab
dapeng-大鹏4 天前
记一次 GitLab Let‘s Encrypt 证书申请失败的排查与修复
gitlab
身如柳絮随风扬4 天前
使用 Docker 部署 GitLab 并分配用户账号 —— 保姆级教程
docker·容器·gitlab
鼎道开发者联盟5 天前
鼎享会 | 从手工到自动化:OpenClaw改造GitLab内部协作流程的全过程
自动化·gitlab·openclaw
ℳ₯㎕ddzོꦿ࿐6 天前
告别手工发版:用 GitLab CI/CD 打通前后端自动化部署的“任督二脉”
ci/cd·自动化·gitlab
ℳ₯㎕ddzོꦿ࿐6 天前
实战:在 Linux 系统用 Docker-Compose 优雅部署 GitLab 及防坑指南
linux·docker·gitlab
源图客6 天前
Linux(CentOS9)服务器部署gitlab-ce-18.11.1-ce.0.el9.x86_64.rpm
linux·服务器·gitlab
ℳ₯㎕ddzོꦿ࿐6 天前
实战篇:结合 GitLab CI/CD 实现 Spring Cloud 微服务自动化部署与防坑指南
spring cloud·ci/cd·gitlab
菜萝卜子7 天前
【Git】GitLab 18.9 全局服务器钩子(Server Hooks)官方规范与落地实践
服务器·git·gitlab