【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分支。

参考文章

相关推荐
极小狐40 分钟前
极狐GitLab 的合并请求部件能干什么?
运维·git·安全·gitlab·极狐gitlab
极小狐10 小时前
极狐GitLab 议题权重有什么作用?
开发语言·数据库·chrome·c#·gitlab
极小狐10 小时前
极狐GitLab 的压缩和合并是什么?
运维·git·ssh·gitlab·github
极小狐17 小时前
极狐GitLab 合并请求依赖如何解决?
运维·git·ssh·gitlab·github
极小狐2 天前
极狐GitLab 项目功能和权限解读
运维·git·安全·gitlab·极狐gitlab
宁酱醇2 天前
GitLab_密钥生成(SSH-key)
运维·ssh·gitlab
极小狐2 天前
极狐GitLab 如何 cherry-pick 变更?
人工智能·git·机器学习·gitlab
云攀登者-望正茂2 天前
60个GitLab CI/CD 面试问题和答案
ci/cd·gitlab·devops
懿瑾2 天前
GitLab Auth2授权-Express + passport-gitlab2
gitlab·angular.js
zhang23839061543 天前
IDEA add gitlab account 提示
java·gitlab·intellij-idea·idea