一背景
把项目更新到仓库里,从头开始建码云仓库,然后提交代码
二步骤
1.新建仓库

2.找到项目 的仓库后面有命令

3.打开本地项目文件夹,右键Git bash Here

4.依次执行上面的命令
简易的命令行入门教程:
Git 全局设置:
git config --global user.name "xx"
git config --global user.email "XX@qq.com"
创建 git 仓库:
mkdir XX(文件夹目录)
cd XX(文件夹目录)
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/xx/XX.git
git push -u origin master
已有仓库?
cd existing_git_repo
git remote add origin https://gitee.com/xx/XX.git
git push -u origin master
三异常
1.设置文件上传大小
git config --global http.postBuffer 524288000(设置大小 默认1M)
2.当git存储库文件大小超过限制时,推送被拒绝(When git repository file size exceeds the limit, push are rejected)
https://gitee.com/bitree/battlefield-simulation/settings#git-gc
3.如果出现error: failed to push some refs to xxxxxx的错误的时候,
简单的两步处理方式为:
1、git config --global lfs.contenttype 0
2、git push
即可解决
本文档详细介绍了如何从头开始在码云上创建并管理Git仓库,包括新建仓库、设置Git全局信息、提交代码以及处理文件上传大小限制和推送错误。此外,还提供了仓库体积过大时的减小方法和解决push失败的解决方案。
875

被折叠的 条评论
为什么被折叠?



