【gitlab】本地项目上传gitlab

需求描述

解决方法

下面的截图是gitlab空项目的描述

上传一个本地项目按其中"Push an existing folder"命令即可。

以renren-fast项目为例

bash 复制代码
# 用git bash 下载renren-fast项目
git clone https://gitee.com/renrenio/renren-fast.git

# 在renren-fast的所属目录 打开git bash

# 进入renren-fast目录
cd renren-fast

# 执行gitlab空目录下的命令提示
git init --initial-branch=master
git remote add origin=http:192.168.61.129:8000/root/test-one.git
git add .
git commit -m "Initial commit"
git push -u origin master
# 在这步之后输入gitlab的用户名和密码即可

上述把main分支替换层了master分支。

参考文章

相关推荐
Fan_5581 天前
4核8G云服务器部署GitLab内存耗尽解决方案
gitlab
洋就在江州1 天前
gitlab-cicd 离线集成——springboot-cicd (非docker形式,shell形式)
java·spring boot·后端·ci/cd·gitlab·gitlab-runner
成为你的宁宁2 天前
【Ubuntu 18.04安装Gitlab】
ubuntu·gitlab
长春的KAKA2 天前
GitLab 项目页面报 500 错误的完整修复记录:PostgreSQL 数据库损坏、统计表缺失及数据库迁移
数据库·postgresql·gitlab
蓝胖的四次元口袋2 天前
GitLab知识梳理
gitlab
极小狐11 天前
CI 作业里 kubectl 连不上集群?用 Kubernetes Agent 打通部署链路的 7 个步骤
ci/cd·kubernetes·gitlab·devops·k8s部署
Zhou14113611 天前
Git_02_GitLab协作与CI_CD
git·ci/cd·gitlab
白帽攻防录11 天前
SRC 挖洞:GitLab GraphQL 指令绕过深度复盘,CVE-2026-19478 未授权删项目怎么打穿代码托管平台
网络·网络安全·gitlab·graphql
daemon.qiang22 天前
国内虚拟机对接 Freedesktop:Fork xserver、自建 Runner 与提交 MR 实战
linux·ubuntu·centos·gitlab·开源软件
snow@li1 个月前
服务器运维:K3S 下 Jenkins ↔ GitLab 的 CI/CD 闭环 / 访问成功
运维·gitlab·jenkins